Re: What is the PictureBox downsampling for its bitmap?

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Thanks a lot Herfried,

The image I'm drawing is the ultrasonic result of some scan.
The values of the image pixels are in the range of 0 to 255 and the image is
PixelFormat.Format8bppIndexed with color palette.
The important thing for me is that when the image is shrunken, the defects
that are drawn in the image will be visible at all time by taking the maximum
value from the shrunken grid. For example; if a 4 square pixels is shrink to
a single pixel, the the single pixel will have the maximum value of the four.
I don't see in which InterpolationMode I can use for this.

Is it possible? How?

--
Thanks
Sharon
________________________________________
"Herfried K. Wagner [MVP]" wrote:

"Sharon" <SharonG@xxxxxxxxxxxxxxxxx> schrieb:
I assume it's the PictureBox graphics I should handle and not the
bitmap's.
Am I right?

Yes, you are right in the case of the picturebox.

Can you forward me dor more detailed specification about the
InterpolationMode options, so I'll be able to see if I can use one of
them,
specially for the max method.

InterpolationMode Enumeration (System.Drawing.Drawing2D)
<URL:http://msdn.microsoft.com/en-us/library/system.drawing.drawing2d.interpolationmode.aspx>

How to: Use Interpolation Mode to Control Image Quality During Scaling
<URL:http://msdn.microsoft.com/en-us/library/k0fsyd4e.aspx>

-------------------------
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
.



Relevant Pages

  • Re: GDI+ DrawImage(Bitmap, ...) stretch problem
    ... I need the solid color of each pixel to be preserved, not dithered or interpolated in any way. ... The first DrawImagedoes not stretch and the 4 rendered pixels are as they should be. ... In each case, I want all 4 bitmap pixels to be rendered as either red or white, no matter how many screen pixels they occupy. ... I have tried all the Graphics, Bitmap, and InterpolationMode options that I can find but have not found the right combination. ...
    (microsoft.public.win32.programmer.gdi)
  • Re: How to Get One-Pixel-Width Edge
    ... But the result of bwmorph is not STRICTLY single pixel width. ... >> child branch on branches directly attached to stem. ... >> are composed of only several pixels. ... Once you have single-pixel width segments, ...
    (sci.image.processing)
  • Re: Smooth lines in Picturebox
    ... As far as the display is concerned a single pixel is the smallest units you can draw. ... In cases where a single pixel is very small (such as on a printer page for example which has perhap 600 pixels in a physical inch) this does not present a problem, because the individual "steps" of a diagonal line are so small than they cannot really be seen. ... There are various ways of "smoothing" such lines, all of which effectively rely on drawing pixels in various different shades. ...
    (microsoft.public.vb.general.discussion)
  • Re: How to Get One-Pixel-Width Edge
    ... I try to thin the edges into one pixel width edges. ... But the result of bwmorph is not STRICTLY single pixel width. ... > are composed of only several pixels. ... Once you have single-pixel width segments, ...
    (sci.image.processing)
  • Re: Smooth lines in Picturebox
    ... As far as the display is concerned a single pixel is the smallest units you can draw. ... In cases where a single pixel is very small (such as on a printer page for example which has perhap 600 pixels in a physical inch) this does not present a problem, because the individual "steps" of a diagonal line are so small than they cannot really be seen. ... There are various ways of "smoothing" such lines, all of which effectively rely on drawing pixels in various different shades. ...
    (microsoft.public.vb.general.discussion)