ImageMagick mogrify stopped working with a great amount of images

644 Views Asked by At

When using

mogrify -format png *.ppm

with a couple of images it works, but when I tried with a great amount of files(Around 20 million) it does not show an error message but after a some minutes the CLI will appear as if it had finished the task but when checking my folder I do not have a single png, I work in windows and have 8 Gigabytes of RAM, so I was wondering:

Does ImageMagick has a limit for the quantity of images?

Or is it just that my computer is not powerful enough for the task?

The files have around 400 Megabytes in total.

Also if there is any other way to get the images into png format even if losing the ppm version please let me know.

2

There are 2 best solutions below

0
Mark Setchell On

Two ideas...

Firstly, use:

mogrify -verbose -format png *.ppm

so you see what's going on.

Secondly, you could try creating a list of files to process like this:

DIR *.ppm /S /B > filelist.txt

Then tell ImageMagick to process that list of files with:

mogrify -format png @filelist.txt

Another idea... try using double quotes:

mogrify -format png "*.ppm"
0
user29679 On

Did you check your ImageMagick policy.xml file?

It should be at homeDirectory/.config/ImageMagick/policy.xml

There are limitations that you can set in that file.

Might want to check Imagemagick security policy page