Running out of space...or not
Posted: 2013-07-10T06:27:52-07:00
I'm running a script to create a 2px by 2px png file for each of the possible 16.7 million colors available in the hex color spectrum. Here's the script:
newhexcodes.txt contains a list of all possible hex colors. Please don't ask why I have to do this instead of auto generating the images at run time. Suffice it to say, I just do. I know that it's very kludgey.
Things begin nicely. I've created a virtual machine with CentOS 6.4 and allocated 1.5 gig of RAM to it. At some point, I get this error:
convert: unable to open image `268611.png': No space left on device @ blob.c/OpenBlob/2480.
There is ample disk space for this. Calculating 16.7 million X 222 bytes per image = ~4.175 GIG. The script fails with more than 19 GIG of disk space still open.
Does IM try to keep all of the process in memory? Is there another cause for this kind of error?
Code: Select all
#! /usr/bin/sh
list=$(cat newhexcodes.txt)
for color in $list; do
convert -size 2x2 xc:"#$color" $color.png
done
Things begin nicely. I've created a virtual machine with CentOS 6.4 and allocated 1.5 gig of RAM to it. At some point, I get this error:
convert: unable to open image `268611.png': No space left on device @ blob.c/OpenBlob/2480.
There is ample disk space for this. Calculating 16.7 million X 222 bytes per image = ~4.175 GIG. The script fails with more than 19 GIG of disk space still open.
Does IM try to keep all of the process in memory? Is there another cause for this kind of error?