我正在尝试将 275 MB CBR 文件转换为 pdf,但转换失败。
这些是我遵循的步骤:
解压rar的命令:unrar e '/tmp/1676456470685.2727/6782.rar' /tmp/1676456470889.922
将解压后的jpg图像转换为pdf的命令:
convert /tmp/1676456470889.922/*.jpg -profile /app/sRGB2014.icc -strip -set profile /app/sRGB2014.icc -compress jpeg -resize 1240.2x1753.95
-gravity Center -extent 1240.2x1753.95 -units PixelsPerInch -density 150 -repage 1240.2x1753.95 -bordercolor white -border 0 output.pdf
错误:
convert: cache resources exhausted `/tmp/1676456470889.922/OPSX-UK-028_Page_154.jpg' @ error/cache.c/OpenPixelCache/3879.
convert: cache resources exhausted `/tmp/1676456470889.922/OPSX-UK-028_Page_155.jpg' @ error/cache.c/OpenPixelCache/3879.
convert: cache resources exhausted `/tmp/1676456470889.922/OPSX-UK-028_Page_156.jpg' @ error/cache.c/OpenPixelCache/3879.
convert: cache resources exhausted `/tmp/1676456470889.922/OPSX-UK-028_Page_001.jpg' @ error/cache.c/OpenPixelCache/3879.
关于系统:
主机:
操作系统:Ubuntu 22.04.1 LTS
内存:64GB
ImageMagick 正在 Docker 容器中运行:
容器操作系统:Ubuntu 20.04.3 LTS
ImageMagick 版本:7.1.0-62
当前ImageMagick资源政策:
<policy domain="resource" name="memory" value="16GiB"/>
<policy domain="resource" name="map" value="32GiB"/>
<policy domain="resource" name="area" value="24GB"/>
<policy domain="resource" name="disk" value="64GiB"/>
Python 中的 CBR 到 PDF 转换器(单个文件 | 批处理):)
https://github.com/AshlanChidester/Holocron-Transformer-CBR-to-PDF-converter/tree/main