homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Visit PubCon.com
Home / Forums Index / Hardware and OS Related Technologies / Linux, Unix, and *nix like Operating Systems
Forum Library, Charter, Moderators: bakedjake

Linux, Unix, and *nix like Operating Systems Forum

GIMP - "batch webify" images in a directory?
Need help batch-reducing images in GIMP

 3:10 pm on Oct 25, 2002 (gmt 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...


Longhaired Genius

 3:39 pm on Oct 25, 2002 (gmt 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)

'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)

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)

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...



 9:06 am on Oct 26, 2002 (gmt 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)

no loger on MS Windows.

Good for you! Windoze is a draaaaaag ;)



 6:11 pm on Oct 26, 2002 (gmt 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)
There is a handy perl script that uses ImageMagic to auto resize all the images in a directory at:

 12:05 pm on Oct 28, 2002 (gmt 0)
Some good stuff here.
Check out *resizeall*

 6:50 pm on Oct 29, 2002 (gmt 0)

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

Global Options:
 top home search open messages active posts  

Home / Forums Index / Hardware and OS Related Technologies / Linux, Unix, and *nix like Operating Systems
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved