Post Reply 

Resizing Script

Dec 26, 2013, 21:52
Post: #1
Resizing Script
I have to resize a large number of photos (about 7000) and I was looking for a plug-in that would help.

I want to simply open the file, run the script to re-size the image to a standard size and export it as a jpg to same file name and replace the old file.

It seems simple enough, but my coding skills are quite limited.

If anyone has seen a script like this, I would appreciate pointing me in the right direction.

Thanks in advance...
Find all posts by this user
Quote this message in a reply
Jan 2, 2014, 14:42
Post: #2
RE: Resizing Script
(Dec 26, 2013 23:14)ofnuts Wrote:  Don't use Gimp for this, use the ImageMagick toolkit. This can be as simple as:
Code:
convert file.jpg -resize 600x600 file.jpg
The "600x600" above doesn't mean the image is resized to a 600x600 square but that it is made to fit inside a 600x600 square, keeping its aspect ratio (so this really means scaling the image so that its largest dimension is 600px). You can also scale by a given factor. See http://www.imagemagick.org/Usage/resize for the full options...

You have to specify an input file and an output file, but these can be the same (which why "file.jpg" appears twice).

To process all the files in a given directory in one command in Windows:
Code:
for /R %f in (*.jpg) do convert %f -geometry 600x600 %f

(see HELP FOR for details on the FOR command). Things are even simpler on OSX and Linux.

This is going to be a lot faster (and less difficult to master) than running a Gimp batch script.

When you scale down, the image is dulled a bit so you can add a little sharpening to boost it, all is done in the same command (the sharpening should be after the resize):
Code:
convert file.jpg -resize 600x600 -sharpen 0x1.0 file.jpg

You can also saturate the colors a bit:
Code:
convert file.jpg -modulate 100,120 -resize 600x600 -sharpen 0x1.0 file.jpg

This is great information. Thank you very much!!
Find all posts by this user
Quote this message in a reply
Jan 2, 2014, 21:26
Post: #3
RE: Resizing Script
I have never used an application like imagemagick. I downloaded it, and dowloaded Visual Basic Widows Express. I have no idea how to open imagemagick with Visual Basic. I'm sure it's simple, its just something I've never done before.

Thakns,
Find all posts by this user
Quote this message in a reply
Jan 2, 2014, 23:24
Post: #4
RE: Resizing Script
Thank you, I appreciate it
Find all posts by this user
Quote this message in a reply
Post Reply 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Run script on action rchav 2 512 Aug 13, 2018 14:57
Last Post: rchav
  Script Fu Errors Gimp 2.10.4 lightsaber jd3481 1 375 Aug 2, 2018 05:13
Last Post: paynekj
  Script-fu script to conversion pdf to image 4ever 12 8,458 Jul 17, 2018 16:01
Last Post: paynekj
  Problems with a bat script :( ThaUnknown_ 1 474 Mar 26, 2018 21:14
Last Post: paynekj
  Script-fu ordered file list vnicent 1 295 Mar 19, 2018 17:33
Last Post: paynekj

Forum Jump:


GIMP ForumPortalArchiveContactTermsRSS