ImageMagick内存使用情况 [英] ImageMagick memory usage

查看:685
本文介绍了ImageMagick内存使用情况的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有100个PNG文件,每个文件大小为8250x4090。我需要将它们与Imagemagick一起附加到一个大的PNG文件(82500 x 40900),这样我就有10行10列。我知道代码必须如何,但我得到错误:convert.exe:无法扩展缓存

I have 100 PNG-files and each of them is 8250x4090 big. I need to append them with Imagemagick to one big PNG-file (82500 x 40900) so that I have 10 rows and 10 columns . I know how the code must look like but I get the errors: convert.exe: unable to extend cache

`C:\Row_345.png': No space left on device @ error/cache.c/OpenPixelCache/3689.
convert.exe: Memory allocation failed `C:\Row_345.png' @ error/png.c/WriteOnePNGImage/8725.

第一个问题:需要多少空间(大约)?我有8 GB的Ram和30 GB的免费SSD,这还不够。这些图片有多达5种不同颜色的多边形和线条。最大的PNG是300 KB)
第二个问题:有没有办法让它变得更聪明,以至于它不会占用那么多空间?

First question: How much space is needed (approximately)? I have 8 GB of Ram and 30 GB free SSD and it wasn't enough. The pictures have polygons and lines in up to 5 different colors. The biggest PNG is 300 KB) Second question: Is there a way how to make it more clever so that it won't use that much space?

推荐答案

如果使用Q16版本,ImageMagick每像素需要8个字节。 Q8版本每个像素只需4个字节。

ImageMagick needs 8 bytes per pixel if you are using a Q16 build. A Q8 build only needs 4 bytes per pixel.

82500 * 40900 * 8 =约27Gbytes
82500 * 40900 * 4 =约13.5 GB

82500 * 40900 * 8 = about 27Gbytes 82500 * 40900 * 4 = about 13.5 Gbytes

PNG的大小无关紧要; ImageMagick将它们保存为未压缩状态。

The size of the PNG is irrelevant; ImageMagick stores them uncompressed.

可能ImageMagick试图保留两个副本 - 您的100个小图像加上大结果。可能你有足够的内存和磁盘来运行ImageMagick-Q8的转换。

Possibly ImageMagick is trying to hold two copies -- your 100 small images plus the large result. It may be that you'll have enough memory plus disk to run your conversion with ImageMagick-Q8.

这篇关于ImageMagick内存使用情况的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆