将一系列图像打印到精确尺寸
我想编写一系列照片的打印脚本,但尺寸要精确。 (例如 dir /tmp/printing 中的所有 jpeg,尺寸为 1.5" x 1.0",每页 6 个)
我碰巧手上有一台 Ubuntu Linux 机器和一台 deskjet 打印机 (hp5150),但可能会使用 Windows,或者可能会购买另一个如果绝对需要打印机。
我对 shell 脚本相当熟悉,但我不太幸运找到在指定目标尺寸的同时打印照片的命令行方法。 GIMP 似乎是一个显而易见的选择,但我的谷歌搜索和一般的摆弄并没有告诉我如何去做。
任何人都可以帮忙(最好有一个例子:)! )。
谢谢!
编辑:感谢 PEZ,我有一种将多个图像打印到一张纸上的机制,但我看不到如何调整图像大小以设置尺寸,即使使用 ImageMajick 也是如此。 我可以将大小调整为以像素为单位指定的尺寸,是否是确定(或设置?)打印机的 DPI 并计算像素尺寸以获得打印尺寸的情况?
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)
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.
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.
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我现在没有 Linux 机器,但我认为使用 ImageMagick(“转换”命令)之类的东西应该可以缩放到图像,然后使用 CUPS 的 n-up 打印来打印图像。 打印命令看起来像这样:
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:
查看此站点以了解 GIMP 中的批处理:http://gimp.org/tutorials/Basic_Batch/
Check out this site for batch processing in GIMP: http://gimp.org/tutorials/Basic_Batch/