Welcome to WebmasterWorld Guest from 54.196.217.43

Forum Moderators: bakedjake

Message Too Old, No Replies

GIMP - "batch webify" images in a directory?

Need help batch-reducing images in GIMP

     
3:10 pm on Oct 25, 2002 (gmt 0)

Full Member

10+ Year Member

joined:June 14, 2000
posts:247
votes: 0


I have a client who got himself a digital camera and is somewhat... trigger-happy. The number of pictures isn't the problem though, it's their size. So, I need to reduce/webify them all, but I don't want to do it one by one. I'm not a graphics guy - is there an easy way to do this in GIMP (or ImageMagick)? Thanks...
3:39 pm on Oct 25, 2002 (gmt 0)

Preferred Member

10+ Year Member

joined:Aug 28, 2002
posts:564
votes: 0


Reducing the size of images is something that should be done at the very earliest stage, ie. before they clog up your mailbox. In my opinion this is something your client should be doing. Can't you tell him what you require, eg. max 750 pixels on the long side, max 50kB. If he has >2 brain cells this will not be difficult.

Not an answer to your question I know...

6:39 am on Oct 26, 2002 (gmt 0)

Full Member

10+ Year Member

joined:Mar 14, 2002
posts:325
votes: 0


'mogrify' tool from imagemagick should do the job at a short shell script. Disclaimer: "The transmogrified image overwrites the original image." That bited me once :)

Longhaired_Genius is right, that should be done by your friend before sending.

6:56 am on Oct 26, 2002 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member pageoneresults is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Apr 27, 2001
posts:12166
votes: 51


Yes, it would be nice if we could always get the client to produce exactly what we needed. ;)

Unfortunately that is not always the case. Most graphic programs that are configured for working with the web have a batch processing tool.

I utilize Fireworks and just had a project with 170 images that started off at 24MB each from a CD, eek! I had to create three sizes of each image; thumb 125px/large 400px/x-large 760px.

I had to do them in groups of 10 because system resources were borderline. It worked like a charm though and saved a heck of a lot of time optimizing images. I was able to specify quality levels for each of the 3 images which gave me maximum compression across the board. They turned out great!

7:05 am on Oct 26, 2002 (gmt 0)

Senior Member

WebmasterWorld Senior Member nick_w is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Feb 4, 2002
posts:5044
votes: 0


I'm not really a graphics guy either but, I use Gimp and although this isn't really what you're looking for it may help. At least untill someone comes along with the right answer ;)

Stick all the images in a directory. cd into it. then


$> gimp *.jpg

That will open them all at once. Though you may want to use PageOne's example and do them in batches.

From there you'll have to do them one buy one but, it's simple and quick.

Right click the image, chose image > scale image, pop in your desired width/height Ctrl s to save, then close and move on...

Nick

9:06 am on Oct 26, 2002 (gmt 0)

Full Member

10+ Year Member

joined:June 14, 2000
posts:247
votes: 0


I'll try that, Dukula...

Funny you should mention opening all images, Nick_W ... I did that already and found out that GIMP *can* open 900+ windows :) XAT Optimizer used to do it for me, but I'm no loger on MS Windows.

9:17 am on Oct 26, 2002 (gmt 0)

Senior Member

WebmasterWorld Senior Member nick_w is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Feb 4, 2002
posts:5044
votes: 0


no loger on MS Windows.

Good for you! Windoze is a draaaaaag ;)

Nick

6:11 pm on Oct 26, 2002 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Sept 12, 2002
posts:885
votes: 0


I use the same approach as Nick does when I get things like this - 'gimp *.jpg' - but I'm sure there has to be a better way. Surely there are nice command-line image modification tools?
11:59 am on Oct 28, 2002 (gmt 0)

Senior Member

WebmasterWorld Senior Member littleman is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:June 17, 2000
posts:2924
votes: 0

There is a handy perl script that uses ImageMagic to auto resize all the images in a directory at:
http://lists.thevoices.net/pipermail/malu/2002-February/000097.html
12:05 pm on Oct 28, 2002 (gmt 0)

Senior Member

WebmasterWorld Senior Member littleman is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:June 17, 2000
posts:2924
votes: 0

Some good stuff here.
http://www.shallowsky.com/software/imagebatch.html
Check out *resizeall*
6:50 pm on Oct 29, 2002 (gmt 0)

Full Member

10+ Year Member

joined:June 14, 2000
posts:247
votes: 0


Thanks, littleman... Very helpful as always. mogrify (ImageMagick) as suggested by Dukula works good 'nuff (thanks) and is very fast.