While trying to turn 877 png files into a pdf, convert.exe fails to allocate memory. I had this problem both in fedora 16 and in windows 7. The fedora install was within virtualbox, and I had only allocated it 2 GB of ram, so I thought maybe I needed more ram, and tried it inside windows. Same error, only around 5GB/8GB used. The program will work at converting it for maybe 5 or 10 minutes, then fail saying "convert.exe: Memory allocation failed '..\book.pdf' @ error/pdf.c/WritePDFImage/1702." The command issued was "convert -page A4 ..\images\*.png ..\book.pdf"
I'm not sure if this a bug, but any help would definitely be appreciated.
Memory allocation failure - 6.7.4-8
Re: Memory allocation failure - 6.7.4-8
Add -limit area 0 to your command line. This forces pixels to disk rather than memory.
Re: Memory allocation failure - 6.7.4-8
Same result. Identical error, time to give error, relative ram usage. Exact command issued this time was "convert -page A4 -limit area 0 ..\images\*.png ..\book.pdf"
Re: Memory allocation failure - 6.7.4-8
This command works for us:
- convert -limit area 0 -limit map 0 -page A4 ..\images\*.png ..\book.pdf
Re: Memory allocation failure - 6.7.4-8
That did it. It took over an hour, but it worked. Thanks for the help. Maybe the program should see that it will not be able to allocate enough memory to complete its task and advise you to use those flags?