如何在PostScript中更改dpi [英] How to change dpi in PostScript

查看:84
本文介绍了如何在PostScript中更改dpi的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是PostScript语言的新手。现在,我正在使用ps打印点的缩放图像。 ps中的默认dpi为72dpi,我想知道如何将其更改为600dpi。

I am a newcomer in PostScript language. Now I am using ps to print a scaled image of dots. The default dpi in ps is 72dpi, I am wondering how to change it to 600dpi.

我编写的代码如下,它是一个点的正方形。

The code i write as follows, it is a square of dots.

%%Dot_unit
%%position setting
100 200 translate
%%size setting    
52 49 scale
%%parameter setting:width height bit matrix
52 49 1 [52 0 0 -49 0 49]
%%dot unit discribe
{<
fff7ff7ff7ff7f 
ffffffffffffff
ffffffffffffff
ffffffffffffff
fffff7ffff7fff
ffffffffffffff
ffffffffffffff
ffffffffffffff
ffffffffffffff
fdfffffdffffff
ffffffffffffff
ffffffffffffff
7ff7ff7ff7ff7f
ffffffffffffff
ffffffffffffff
ffffffffffffff
ffff7ffffff7ff
ffffffffffffff
ffbfffffbfffff
ffffffffffffff
ffffffffffffff
ffffffffffffff
ffffffffffffff
ffffffffffffff
7ff7ff7ff7ff7f
ffffffffffffff
ffffffffffffff
ffffffffffffff
fffffff7ffffff
ffffffffffffff
fffffbffffffff
ffffffffffffff
ff7fffffffffff
ffffffffffdfff
ffffffffffffff
ffffffffffffff
7ff7ff7ff7ff7f
ffffffffffffff
ffffffffffffff
ffffffffffffff
ffffffff7fffff
ffffffffffffff
ffffffffffffff
ffffffffffffff
ff7fffffffffff
7fffdfffffdfff
ffffffffffffff
ffffffffffffff
fff7ff7ff7ff7f
>}
image
showpage


推荐答案

没有默认dpi在PostScript中。设置用户空间以使坐标系为英寸72单位,但这实际上不是一回事。如果要使用其他用户空间,则可以更改CTM(当前转换矩阵)。所有坐标系统的更改都依赖于对矩阵(通常是CTM)的更改。

There is no default dpi in PostScript. User space is set up so that the co-ordinate system is 72 units to the inch, but that's not actually the same thing. If you want a different user space then you alter the CTM (Current Transformation Matrix). All co-ordinate system alterations rely on changes to a matrix, often the CTM.

对于图像,图像操作员将图像映射到1单位正方形的区域中,然后使用CTM将其传递到图像矩阵以渲染到画布。在上述示例的情况下,图像在x方向上缩放比例为52,在Y方向上缩放比例为49。如果更改比例或图像矩阵,将得到不同的结果。

In the case of images, the image operator maps the image into a 1 unit square area, which is then passed through the image matrix to render to the canvas, using the CTM. In the case of the example above the image is scaled by a factor of 52 in the x direction and 49 in the Y direction. If you change the scale or the image matrix, you will get different results.

图像的覆盖区域与设备无关,在您打印用户空间对象时被渲染到设备空间(使用设备矩阵)。因此,如果您的打印机是600 dpi或2400 dpi,则图像仍将覆盖输出页面上的相同区域。

The area covered by the image is device-independent, when you print it the user space objects are rendered into device space (using the device matrix). So if your printer is 600 dpi or 2400 dpi, the image will still cover the same area on the output page.

您需要担心的是所需的区域涵盖了,您无需担心解决方案。

All you need to worry about is the area you want covered, you don't need to be concerned with the resoltuion.

这篇关于如何在PostScript中更改dpi的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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