将一系列图像打印到精确尺寸

时间:2022-08-02 21:48:24

I'd like to script printing of a series of photographs, but to exact dimensions. (e.g. all jpegs in dir /tmp/printing, at 1.5" x 1.0", 6 to a page)

我想编写一系列照片的打印脚本,但要精确尺寸。 (例如dir / tmp / printing中的所有jpegs,1.5“x 1.0”,6页到一页)

I happen to have my hands on a Ubuntu Linux box and a deskjet printer (hp5150) but could probably use Windows or possibly get another printer if absolutely required.

我碰巧在Ubuntu Linux机器和deskjet打印机(hp5150)上工作,但如果绝对需要,可能会使用Windows或者可能会使用另一台打印机。

I'm reasonably familiar with shell scripting but I'm not having much luck finding a command line method of printing photos while specifying the target dimensions. GIMP seemed an obvious choice but my google-fu and general fiddling hasn't shown me how to do it.

我对shell脚本非常熟悉,但是在找到目标尺寸的同时找到打印照片的命令行方法并不是很幸运。 GIMP似乎是一个明显的选择,但我的谷歌和一般的小提琴并没有告诉我如何做到这一点。

Can anyone help (preferably with an example :)! ).

任何人都可以帮助(最好有一个例子:)! )。

Thanks!

EDIT: Thanks to PEZ, I have a mechanism for printing mutiple images to a sheet, but I can't see how to resize images to set dimension, even using ImageMajick. I can resize to a dimension specified in pixels, is it a case of determining (or setting?) the DPI of the printer and calculating the pixel dimensions to get the printed dimensions?

编辑:感谢PEZ,我有一个机制,可以将多个图像打印到一张纸上,但是我看不到如何调整图像大小以设置尺寸,即使使用ImageMajick也是如此。我可以调整大小以像素为单位指定的尺寸,是确定(或设置?)打印机的DPI并计算像素尺寸以获得打印尺寸的情况?

2 个解决方案

#1


I don't have my hands on a Linux box right now, but I think it should work to use something like ImageMagick (the "convert" command) to scale to images and then use the n-up printing of CUPS to print the images. The print command would look something like so:

我现在没有把手放在Linux机器上,但我认为应该使用像ImageMagick这样的东西(“转换”命令)来缩放图像,然后使用CU的n-up打印来打印图像。 print命令看起来像这样:

lp -o number-up=6 my_scaled_image_*.jpg

#2


Check out this site for batch processing in GIMP: http://gimp.org/tutorials/Basic_Batch/

在GIMP中查看此站点的批处理:http://gimp.org/tutorials/Basic_Batch/

#1


I don't have my hands on a Linux box right now, but I think it should work to use something like ImageMagick (the "convert" command) to scale to images and then use the n-up printing of CUPS to print the images. The print command would look something like so:

我现在没有把手放在Linux机器上,但我认为应该使用像ImageMagick这样的东西(“转换”命令)来缩放图像,然后使用CU的n-up打印来打印图像。 print命令看起来像这样:

lp -o number-up=6 my_scaled_image_*.jpg

#2


Check out this site for batch processing in GIMP: http://gimp.org/tutorials/Basic_Batch/

在GIMP中查看此站点的批处理:http://gimp.org/tutorials/Basic_Batch/