Re: Bitmap class problem

From: Nick (pacemkr_at_optonline.net)
Date: 07/05/04


Date: Mon, 05 Jul 2004 04:38:03 GMT

TCR wrote:
> Hi,
> I'm using the Image.FromImage() function to load a jpg file into a bitmap
> class and then convert it to a lower resolution. The problem I'm having is
> that if I check the resolution of the image using either of the properties
> (Horizontal or Vertical), it reports it as 72 dpi when in fact they are 300
> dpi. Is this a known bug? For example I have an image that is 1200 X 1600
> pixels at 300 dpi but when I load it into the bitmap class it reports the
> width and height correctly in pixels but not the resolution.
> Any help would be greatly appreciated,
> Troy Reagan
>
>

Try importing the image from file like this. See if that makes any
difference.

Bitmap myBitmap = new Bitmap("filename");