She*_*zod 15 png jpeg conversion macos
我有 10k+ GIF 文件,我需要最好使用命令行将其转换为 PNG 或 JPEG,以便我可以将其自动化。我不担心失去质量或透明度,只需要为 OCR 软件准备文件。
尝试使用时convertformat
,我得到了这个:
Error in pixReadStreamGif: function not present
Error in pixReadStream: gif: no pix returned
Error in pixRead: pix not read
Error in pixGetDepth: pix not defined
Error in pixWrite: pix not defined
Run Code Online (Sandbox Code Playgroud)
有任何想法吗?
slh*_*hck 37
不需要任何额外的工具。OS X 有sips
,它可以将图像转换为(几乎)任何格式。
例如,要将每个转换.gif
为.jpeg
,将它们放入名为 的文件夹中jpegs
:
mkdir jpegs
sips -s format jpeg ./*.gif --out jpegs
Run Code Online (Sandbox Code Playgroud)
或者,使用 递归转换它们find
,这将在其旁边放置一个与 GIF 同名的 JPEG 文件。
find . -iname "*.gif" -type f -exec sh -c 'sips -s format jpeg "$0" --out "${0%.gif}.jpeg"' {} \;
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
19235 次 |
最近记录: |