none
Bitmap Resolution RRS feed

  • Question

  • I need to change the resolution of some bitmaps and everything works fine if I use

    Bitmap.SetResolution(150F, 150F);

    I can open the bitmap in PhotoShop the resolution shows exactly 150 ppi.

    However, if I use

    Bitmap.SetResolution(250F, 250F);

    and then subsequenetly open the bitmap in PhotoShop the resolution shows as 250.125 ppi.  I really need to be able to create a bitmap that is exactly 250 ppi.  How can I do that?  Why does it add the 0.125 to any value about 244 ppi?

    Thursday, January 31, 2013 5:37 PM

Answers

  • The ppi depends upon the property item used to store it, which varies with codec.  You might try using the property item that PhotoShop typically uses for your image format.  Normally it isn't a very important parameter.  It's simply a recommendation for the size of the image.  A change in the overall size of 1 part in 1000 would normally be imperceptible.
    Thursday, January 31, 2013 8:50 PM

All replies

  • The ppi depends upon the property item used to store it, which varies with codec.  You might try using the property item that PhotoShop typically uses for your image format.  Normally it isn't a very important parameter.  It's simply a recommendation for the size of the image.  A change in the overall size of 1 part in 1000 would normally be imperceptible.
    Thursday, January 31, 2013 8:50 PM
  • Thanks.  That seems likely. 

    This application prepares enlarged photos for printing and framing on canvas and embossed paper.  These photos are cut out with an XY computerized cutting machine and must be within plus or minus 0.005" so I have to be very careful with dimensions (especially considering that at 250 ppi one pixel is 0.004").

    I found the putting 249.875 in the resolution would give me a bitmap that 250 ppi when opened in photoshop.  I will try using a different codec as you suggest.

    Friday, February 1, 2013 3:44 PM
  • "especially considering that at 250 ppi one pixel is 0.004"

    Setting the resolution doesn't change the size of a pixel.  If you have an image of 1000 pixels by 1000 pixels and resolution of 100 ppi by 100 ppi.  The  recommended size of the image is 10 inches by 10 inches.  If you change the resolution to 250 ppi by 250 ppi, you are stating that the recommended size is 4 inches by 4 inches. You still have 1000 pixels by 1000 pixels. 

    Friday, February 1, 2013 4:05 PM