Setting image DPI in relation to height/width C#
        Posted  
        
            by Aaron
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Aaron
        
        
        
        Published on 2009-05-28T14:02:15Z
        Indexed on 
            2010/03/15
            6:29 UTC
        
        
        Read the original article
        Hit count: 422
        
Hi,
I'm writing an application to send some images to a third party, and the images must be 200x200 DPI. The image is a Bitmap and is sized at 500 width and 250 height.
The first time I tested the images with the third party, my resolution was incorrect.  I merely used image.SetResolution(200,200) to correctly set it to 200x200.  This, however, only changed the resolution tag for the image and did not properly, according to my third party technical contact, adjust the image height and width.  
Is there a ratio that I can use so that for each X units I increment the resolution, I merely increment the corresponding height or width Y units? I thought that I could just increment resolution without having to increment height or width.
Thank you, Aaron.
© Stack Overflow or respective owner