c# - 重新生成\保存图像时如何设置 "Resolution Unit"

标签 c# image tiff

我正在尝试调查我认为在生成 TIF 图像的应用程序中遇到的问题。

为此,我尝试按照此 msdn Encoder.Compression example 自己重新生成\保存图像(除非我使用 CompressionCCITT4)。

输出文件的“分辨率单位”= 2,但我想将其设置为 1。

问题:

有什么想法如何设置“分辨率单位”吗?

对于图像应该产生的效果有什么想法吗?

谢谢!

最佳答案

免责声明:作为一名 Java 人员,我不知道如何使用您描述的库来设置它。所以我只回答问题第2部分:

Any ideas on the effect that would\should have on the image?

简单的回答是:无。仅当您将图像导入页面设置/布局程序、文字处理程序、打印等时才重要。但许多软件简单地假设 72dpi无论 x/y 维度如何。

以下是 TIFF 规范的规定:

Typically, TIFF pixel- editors do not care about the resolution, but applications (such as page layout programs) do care.

还有:

1 = No absolute unit of measurement. Used for images that may have a non-square aspect ratio, but no meaningful absolute dimensions.

The drawback of ResolutionUnit=1 is that different applications will import the image at different sizes. Even if the decision is arbitrary, it might be better to use dots per inch or dots per centimeter, and to pick XResolution and YResolution so that the aspect ratio is correct and the maximum dimension of the image is about four inches (the “four” is arbitrary.)

关于c# - 重新生成\保存图像时如何设置 "Resolution Unit",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18900600/

相关文章:

c# - 如何处理通用返回 T 的异常

c# - 与 UserControl 的双向绑定(bind)

java - SWT<->AWT 图像转换之间的透明度

python - 将 Tiff 图像 float 到 numpy 数组

opencv - 如何在OpenCV中输出和索引(黑白)Tiff图像

c# - 如何处理 Web 服务和后端/基础设施源代码版本控制

jquery - 当 img 不存在时使用 ReactJS 将其替换为空

java - 在我的网页中取一个3rd party applet的 "screenshot"

objective-c - iOS 的图像资源

c# - 通过代理运行 Azure 托管网站