有什么软件可以用来将图像转换为其他格式?

我正在寻找一个可以完成以下功能的应用程序:
- 调整一个或多个图像的大小 - 压缩图像 - 旋转和翻转图像 - 使用渐进数字或前缀/后缀对多个图像进行重命名 - 将整个PDF文件转换为一组图像 - 从Windows的.ico文件中提取图像 - 将图像转换为DPX、EXR、GIF、JPEG、JPEG-2000、PDF、PhotoCD、PNG、Postscript、SVG、TIFF和其他格式
我使用的是Ubuntu GNOME 15.10和GNOME 3.18。
3个回答

ImageMagick

如果你想使用命令行选项,选择 ImageMagick

使用 sudo apt-get install imagemagick 进行安装

用法

大多数操作将使用 convert 命令。 要将图像转换为其他格式,你只需将图像重命名为所需的文件扩展名。

convert image1.png image1.jpg

调整图片大小,请使用-resize选项。

convert image1.png -resize 200×100 image1.png

请注意,使用-resize时,ImageMagick将保留图像的长宽比并将其适应指定尺寸的图像中。要强制图像达到特定大小,请在尺寸后面添加!
convert image1.png -resize 200×100! image1.png

使用度数的-rotate选项旋转图像。以下命令将旋转图像90度:

Rotate images

convert image1.jpg -rotate 90 image1-rotated.jpg

由于这是一个命令行工具,您可以利用Bash并执行批量操作。以下命令将获取当前目录中的所有PNG文件,旋转它们,并保存每个文件的新副本,并在每个文件名的开头添加“-rotated”。
for file in *.png; do convert $file -rotate 90 rotated-$file; done

在任何操作中,如果输出图像的名称与输入图像相同,该操作将覆盖原始图像。否则,将创建一个新的图像。
您可以在ImageMagick网站上找到更完整的文档这里
限制
  • 将整个PDF文件转换为一组图像
  • 从Windows .ico文件中提取图像
我不确定这些操作是否可行。
  • 将图像转换为DPX、EXR、GIF、JPEG、JPEG-2000、PDF、PhotoCD、PNG、Postscript、SVG、TIFF和其他格式
我不确定ImageMagick是否支持所有这些文件格式。 答案来源

工作得很好,Arch也没问题! - user690429

Converseen正是适合你的应用程序!使用以下方式进行安装:
sudo apt-get install converseen

这个完全按照你的要求做到了,而且还更多!它支持你所要求的所有格式,并且由于Magick++图像库的支持,它支持超过100种图像格式! 描述:
Batch image converter and resizer
You can convert an unlimited number of images and / or create thumbnails
to any of the most popular formats: DPX, EXR, GIF, JPEG, JPEG-2000, PDF,
PhotoCD, PNG, Postscript, SVG, and TIFF.
Thanks to the Magick++ image libraries it supports more than 100 image formats.

截图:

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here


作为对关于this answer">imagemagik的补充:
可以将其添加到桌面文件(菜单服务、动作、合同文件等)中的文件管理器上下文菜单中。
在运行选择文件的转换命令时,保持文件名不添加输入扩展名到输出名称中。
program "$0" "${0%%.*}".extension' %f

例子:

convert "$0" "${0%%.*}".png' %f

在Nautilus/PCManFM操作中:
Exec=bash -c 'convert "$0" "${0%%.*}".png' %f

使用Nautilus配置工具创建,文件为:
[Desktop Entry]
Type=Action
ToolbarLabel[en_US]=Convert to png
ToolbarLabel[en]=Convert to png
ToolbarLabel[C]=Convert to png
Name[en_US]=Convert to png
Name[en]=Convert to png
Name[C]=Convert to png
Profiles=profile-zero;

[X-Action-Profile profile-zero]
Basenames=!image/png;image/*;*;
Exec=bash -c  'convert "$0" "${0%%.*}".png' %f
Name[en_US]=Default profile
Name[en]=Default profile
Name[C]=Default profile