GDI+ : Changing DPI

孤街浪徒 提交于 2019-12-13 00:33:40

问题


I have two points that i need be to be clarifief on :

  • changing image DPI from 200 to 100 does it mean that i have to resize the image by half or i could keep the actual dimensions but decrease the DPI.

  • I herd that GDI+ could be a nice alternative to change the image DPI, i googled in that way but i found no example showing how to change the DPI with GDI+.

Any Idea about those questions, and thank you.


回答1:


Changing the dpi of an existing image doesn't make much sense. It records the resolution of the device that created the image. So that it can be displayed at the same physical size on another device with a different dpi setting. Which is how an image you drew in a painting program on a monitor with 96 dpi doesn't turn into a postage stamp one-sixth the size when you print it on a printer with 600 dpi resolution.

By changing it in your code when you already have the image, you are basically trying to change the characteristics of the device that created the image. That doesn't make sense, your code cannot reach back and, say, change the CCD in the camera or change the monitor resolution.

It's just a reference number.

You can display or print the image at any size you want, it doesn't have to match the original size.



来源:https://stackoverflow.com/questions/11757542/gdi-changing-dpi

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!