本文介绍了Ghostscript将PDF转换为JPG(CMYK配置文件)分辨率错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Ghostcript将一些PDF文件转换为JPG.转换程序时一切正常,转换时要考虑600dpi的分辨率,并输出jpeg质量好.

I'm using Ghostcript to convert some PDF files to JPG. All is working when converting the program consider the resolution of 600dpi when converting and output jpeg quality is good.

这是我的代码:

 gs -sDEVICE=jpegcmyk -dTextAlphaBits=4 -r600 -dSAFER -dBATCH -dNOPAUSE -o my_output_file.jpg my_input_file.pdf

但是当我在Photoshop中打开文件时,属性包含的是 72dpi 而不是我期望的600dpi:

But when I open the file in Photoshop, the properties contains 72dpi instead of 600dpi I expected :

当我尝试使用 RGB配置文件进行输出时,没关系,我的分辨率为600dpi.

When I try with RGB profile for output, it is ok, I have got 600dpi.

所以我想要的是图像属性中的 CMYK + 600dpi .

So what I want is CMYK + 600dpi in image properties.

推荐答案

从屏幕截图中可以看到,两个图像的尺寸相同,均为6803 x 709像素.

As can be seen from your screenshots, both images are of the same dimensions, 6803 by 709 pixels.

这就是一切.

此外,CMYK版本的大小比RGB版本大33%左右-正如预期的那样,具有4个颜色通道而不是3个颜色通道的图像.

Also, the size of the CMYK version is bigger by about 33% compared to the RGB version -- as is to be expected for an image with 4 color channels instead of 3.

Ghostscript在转换PDF文件时使用-r600 CLI参数正确扩展了像素数.

Ghostscript used the -r600 CLI parameter to correctly expand the number of pixels when converting the PDF file.

在将PDF转换为栅格时,Ghostscript不会在其输出中添加任何EXIF元数据.

Ghostscript does not add any EXIF metadata to its output when converting a PDF to raster.

DPI或PPI信息将是内部元数据提示,以告诉任何合规查看者在屏幕上呈现图像的大小.它不会改变图像信息本身中的任何实质内容.

The DPI or PPI information would be an internal metadata hint to tell any compliant viewers how big to render the image on screen. It would not change anything substantial in the image information itself.

为什么Photoshop确实认为其中一种应使用72 dpi,而另一种却应使用600 dpi,您可以向Adobe询问.

Why Photoshop does think it should use 72 dpi for one, but 600 dpi for the other, you may ask Adobe about.

我敢打赌,Photoshop还会在屏幕上渲染72dpi文件,该文件的分辨率是其他文件的7倍.是这样吗?

I bet Photoshop also renders the 72dpi file about 7 times larger on screen than the other. Is that the case?

PS::另请参见 什么DPI可以处理网络图像需要成为?"

P.S.: See also "What DPI do web images need to be?"

这篇关于Ghostscript将PDF转换为JPG(CMYK配置文件)分辨率错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-19 02:52