图像高度和宽度(英寸) [英] Image Height and width in inches

查看:140
本文介绍了图像高度和宽度(英寸)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨,,

如何在英寸中找到图像的高度和宽度?我试过了



Hi,,
How to find the image height and width in Inches? I tried

objImgDimensions.Width = (objImage.Width / objImage.HorizontalResolution);
objImgDimensions.Height = (objImage.Height / objImage.VerticalResolution);





但是,我知道,.net应用程序中显示的DPI是96,有些应用程序如插图画家,它大约是72或类似的。



无论使用何种显示设备和应用程序,如何以英寸为单位获得准确/标准的图像高度和宽度..



任何建议都表示赞赏。





谢谢。



but,I came to know that, the DPI shown in .net application is 96 and some apps like illustrator, it is around 72 or like that.

How can I get the accurate/standard height and width of image in inches irrespective of display device and application used..

any suggestion is appreciated.


thank you.

推荐答案

一般情况下,图像没有任何特定的英寸大小。某些图像格式包含元数据,显示分辨率,这实际上不是分辨率,而是建议(默认,意愿)每英寸点数值,可用于打印,当用户想要使用原始大小选项进行打印。 72 dpi听起来很荒谬,它通常被称为默认屏幕分辨率(但现代显示器通常具有更少的像素大小,这个标准纯粹是临时价值,过时,像问题Y2000一样愚蠢),但是打印的真实质量分辨率至少应为300 dpi。扫描仪通常支持更好的分辨率。



这根本没什么意义。实际图像大小是在两个维度上测量的像素数。通常不使用将屏幕中的图像绘制到特定物理尺寸。它需要知道屏幕的像素大小,并且是可变值。想一想:插上一台显示器,插上另一台显示器。如果您的应用程序正在运行,它将立即以不同的物理大小在屏幕上显示相同的图像;它不会收到任何通知。



-SA
In general case, the image does not have any certain size in inches. Some image format contains metadata showing "resolution", which is actually not resolution but suggested (default, intendend) dot per inch value, which can be used in printing, when the user want to print with the "original size" option. 72 dpi sounds ridiculous, it was often referred as default screen "resolution" (but modern monitors usually have much less pixel size, this "standard" is purely ad-hoc value, obsolete, something as stupid as "problem Y2000"), but real quality "resolution" for printing should be about 300 dpi as a minimum. Scanners usually support much better "resolution".

It simply makes little sense. Real image size is the number of pixels measured on both dimension. Drawing an image in screen to certain physical size is not usually used. It requires knowledge of the pixel size of the screen and is a variable value. Think about this way: you plug out one monitor, plug in another one. If your application is running, it will the same image on screen in a different physical size immediately; it won''t receive any notification.

—SA


这篇关于图像高度和宽度(英寸)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆