What is the PictureBox downsampling for its bitmap?

Tech-Archive recommends: Fix windows errors by optimizing your registry



Using VS2005 with .NET Framework 2.0

I'm using the the System.Windows.Forms.PictureBox to display a bitmap when
the PictureBox.SizeMode is PictureBoxSizeMode.StretchImage
The PictureBox can be resized by the user.

When the PictureBox size is less then the bitmap size then the bitmap is
resized by the PictureBox to a smaller size to fit the PictureBox size.

My question is: What method is used to downsize the bitmap?

For example: Lets say the bitmap is downsized by half from 100x100 to 50x50.
It means that every 4 pixels square should be converted to a single pixel. It
can be done by taking the maximum value of the four pixels. It can by done
bay taking the average value of the four pixels. Or maybe even the minimum
value of the four pixels, or...

So what is the method of the downsampling of the bitmap?
How can I choose this method?


--------
Thanks
Sharon
.



Relevant Pages

  • Re: Need for thumbnails
    ... AutoRedraw PictureBox, and returns the picture as byte array, ... Dim LastDllError As Long ... ' Gets bitmap info and pixel value of AutoRedraw PictureBox or form ...
    (microsoft.public.vb.general.discussion)
  • Re: how to use GDI+ to color pixels from array
    ... > in a PictureBox based on the x and y coordinates for individual pixels ... > in an array. ... then create a new 'Bitmap' object from the data (see ...
    (microsoft.public.dotnet.languages.vb)
  • Re: VB 2005 equivalent of VB 6 PictureBox.Point, VB 2005 general confusion.
    ... > data layer should be separated from presentation layer. ... > which means calling the GetPixel method on a Bitmap object. ... No, a Picturebox is there to display a Bitmap, not the other way round. ... picturebox, and then (in VB6 at least), I could use SavePicture ...
    (microsoft.public.dotnet.languages.vb)
  • Re: VB 2005 equivalent of VB 6 PictureBox.Point, VB 2005 general confusion.
    ... a Bitmap, the presentation is the picturebox on the screen. ... VB6 it was convenient, and exactly what I wanted, to use PictureBox's ... PictureBox that I can call GetPixel on? ... paint on a Bitmap and have ...
    (microsoft.public.dotnet.languages.vb)
  • Bitmap transparent color not so transparent it seems
    ... Using MakeTransparent one can supposedly turn a color used in a Bitmap to ... it looks to me like all it does it set these pixels to the ... the transparent color of a Bitmap stored in the Image of a PictureBox and ... placed the PictureBox on a Form which has a BackColor of black, ...
    (microsoft.public.dotnet.languages.vc)