As the subject says: Whats the difference between Image.VerticalResolution and Image.Width. Aren't they the same thing?
-
Possible duplicate of: http://stackoverflow.com/questions/6221359/difference-between-bitmap-height-and-verticalresolution – Marcus Oct 21 '15 at 08:59
-
I think you might see here! :) http://stackoverflow.com/questions/6221359/difference-between-bitmap-height-and-verticalresolution – Paolo Zaia Oct 21 '15 at 09:02
3 Answers
No, the vertical resolution is the number of pixels per inch, vertically (height-wise). The horizontal resolution would be the number of pixels per inch horizontally (width-wise)
Image.Width
and Image.Height
would be the exact width and height in pixels.
An image width a resolution of 100DPI, and a width
and height
of 200 (pixels) would display as a 2 by 2 inch image.

- 8,614
- 26
- 52
Not quite.
Image.VerticalResolution
gets the vertical resolution of the image in pixels per inch. Similarly, Image.HorizontalResolution
does this across the screen
Image.Width
gives the exact width of the image in pixels. Image.Height
would give the exact width in pixels

- 1,612
- 2
- 18
- 29
The Image.VerticalResolution = Gets the vertical resolution, in pixels per inch, of this Image.
Image.Width = The width, in pixels, of this Image.
See https://msdn.microsoft.com/en-Us/library/system.drawing.image.verticalresolution%28v=vs.110%29.aspx and https://msdn.microsoft.com/en-Us/library/system.drawing.image.width%28v=vs.110%29.aspx for more details.

- 4,811
- 8
- 38
- 72