3 ms·
In my experience not the optimization is the hard part. But the eventually necessary scaling down you have to do first. Doing this with Imagemagick, Pillow or w
by tobltobs 9y ago
In my experience not the optimization is the hard part. But the eventually necessary scaling down you have to do first.
Doing this with Imagemagick, Pillow or whatever will result in possible OOMs or gigabyte sized, not so temporary files filling your /tmp dir for large source images.
The only tool I ever found which does this job reliable even for huge images is http://www.vips.ecs.soton.ac.uk http://www.vips.ecs.soton.ac.uk .
- brightball 9y agoNeed to use the thumbnail flag with imagemagick. Gives it a huge performance boost and strips the metadata out of the file.
- r1ch 9y agoBe very careful with this one! -thumbnail causes ImageMagick to embed "freedesktop.org Thumbnail Managing Standard" metadata into the output image. Such metadata includes the full local path (!). I found this by accident on our wiki (Mediawiki, which uses ImageMagick). https://phabricator.wikimedia.org/T108616 https://phabricator.wikimedia.org/T108616
- brightball 9y agoWas not aware of that....
- tobltobs 9y agoThe thumbnail flag doesn't change the way Imagemagick creates a pixelmap of the complete image.
- mkj 9y agoIn my experience graphicsmagick solves most OOM problems of Imagemagick. It's also faster.