faster image resizing in linux
I take pictures. Great. They are huge, I like that. Great.
But what if I want to send them via email? Or post them on the web.. or just.. store them.
My source images are 4000×4000 pixels. I want to size them to limits of 1200×1200.
My first call is using imagemagick..
-
imagemagick
mogrify -resize 1200x1200 ./images*
Great. But this is SLOW as all heck.
Imagemagick means for quality, not speed.Speeding up image magick resizing
Use another resizing algorithm. In this example images will be softer, less detailed.
mogrify -filter Point -resize 1200x1200 ./images* convert ./img_in.jpg -filter Point -resize 1200x1200 ./img_out.jpg
-
imgresize
I wondered if I used some library or other, would it be faster than imagemagick? Yes, actually.
This is lower quality and slightly faster.
If you have a ton of images, this will save some time.
The imgresize distro is in perl, it uses Image::Resize library. -
epeg
epeg -m 1200,1200 ./img_in.jpg ./img_out.jpg
THE END ALL BE ALL
epeg. Quick, ridiculously quick. Dangerously quick.
This will fuck your images up somewhat.. but… you can resize large image very fucking fast.
Here’s a script to resize an image down from a monstrous size down to a nifty 1800×1800.. imgsizedown
elsewhere..
SEE ALSO
Libor Tinka has some very interesting technical information about enlarging images.
See out also, epeg- a fast jpeg image downsizer. Quick, I tried it out. I suggest going to rpmfind to seek for epeg.
Unfortunately, 0.07 version of perl module Image::Epeg is broken for me. The date is June 2005.
I’ll write the author and see what’s up..
