Page 1 of 1

High memory usage when converting mng image

Posted: 2015-05-20T01:40:21-07:00
by AndreasEriksson
Hi, I am trying to convert https://dl.dropboxusercontent.com/u/250 ... 167b7d.png into a jpeg image but the convert process takes up all my ram and runs forever.

convert.exe" "ba969d5a-072f-4d8d-b5f7-5732c1167b7d.png" -layers flatten -depth 8 -colorspace sRGB -quality 50 -resize 256x256 -write "image.jpg" -quality 50 -resize 150x150 "image2.jpg

I am using ImageMagick-6.9.1-2-Q16-x64-static.exe

The image opens up ok in irfanview.

Re: High memory usage when converting mng image

Posted: 2015-05-20T01:55:03-07:00
by snibgo
Clicking on your link, I get "The image https://dl.dropboxusercontent.com/u/250 ... 167b7d.png cannot be displayed because it contains errors."

Re: High memory usage when converting mng image

Posted: 2015-05-20T02:11:51-07:00
by AndreasEriksson
Download and open in irfanview.

Re: High memory usage when converting mng image

Posted: 2015-05-20T05:55:20-07:00
by glennrp
It contains a LOOP chunk that says
  • chunk LOOP at offset 0x00106, length 5: nest level = 0
    count = 2147483647, termination = deterministic
So yes you'll run out of memory if you don't have enough to hold 2^31-1 frames.

Re: High memory usage when converting mng image

Posted: 2015-05-20T06:34:31-07:00
by AndreasEriksson
Can I make it terminate somehow?

I have 16 GB of memory on my machine and it did not complete in 30 min and did not run out of memory.
The process went up to about 12 GB in the first minute and then it went back down again to about 1 GB.
It seems to be caching to disk as I almost ran out of space on my harddrive.