Hi all,
I have some 600x450 pixel photos and want to reduce their size to 60K and keep the aspect ratio, GIMP can't do it , anyone know of a Linux photo manipulation SW for batch processing photos?
--------------------------------- Looking for last minute shopping deals? Find them fast with Yahoo! Search.
On Friday March 14 2008 2:38:29 pm elk dolk wrote:
I have some 600x450 pixel photos and want to reduce their size to 60K and keep the aspect ratio, GIMP can't do it , anyone know of a Linux photo manipulation SW for batch processing photos?
unless I don't understand something, I do this all the time with GIMP -- what's the problem you're having? batch processing is a separate issue, but scaling is certainly within GIMP's capabilities
On Fri, 14 Mar 2008 11:38:29 -0700 (PDT) elk dolk elkdolk@yahoo.com wrote:
I have some 600x450 pixel photos and want to reduce their size to 60K and keep the aspect ratio, GIMP can't do it , anyone know of a Linux photo manipulation SW for batch processing photos?
Image Magick can do pretty much anything you want with that sort of thing.
2008/3/14 elk dolk elkdolk@yahoo.com:
Hi all,
I have some 600x450 pixel photos and want to reduce their size to 60K and keep the aspect ratio, GIMP can't do it , anyone know of a Linux photo manipulation SW for batch processing photos?
ImageMagick
elk dolk wrote:
Hi all,
I have some 600x450 pixel photos and want to reduce their size to 60K and keep the aspect ratio, GIMP can't do it , anyone know of a Linux photo manipulation SW for batch processing photos?
You are mixing units, 600x450 is pixels, and I assume you want 60k as a file size.
cd dir_with_images mkdir SMALL ls *.jpg | while read file; do djpeg "${file}" | pnmscale -xys 400 300 | cjpeg -Q 60 -o -smo 20 -dct float >SMALL/"${file}" done
Notes: 1 - the quotes are needed if you have special characters in the filenames 2 - -Q is quality, higher is larger, adjust to tune 3 - "-xys 400 300" scales to 400x300, you can also use a single f.p. number like 0.7 to scale to fractional sizes. You may not need to scale at all, that step is optional if the cjpeg makes things small enough. 4 - "-o" is optimize, create smaller image, keep that option 5 - "-smo xx" is smoothing, if you use too much the images will be smaller but look like garbage. 6 - don't use xargs, handling special characters in filenames is ugly 7 - don't simplify to "while file in *.jpg" because it fails if you have too many files, and bash gives you "line too long" errors
As you may have guessed I have done rather a lot of these, this script should be bulletproof. Install netpbm if you don't have it.
On Friday 14 March 2008 11:38:29 am elk dolk wrote:
Hi all,
I have some 600x450 pixel photos and want to reduce their size to 60K and keep the aspect ratio, GIMP can't do it , anyone know of a Linux photo manipulation SW for batch processing photos?
nautilus-image-converter is available in add/remove software. when installed you can open a folder in nautilus and select images and specify what resize you want, works on one or many images, in place or in a new folder. very handy.
Dave
Looking for last minute shopping deals? Find them fast with Yahoo! Search.
2008/3/14 elk dolk elkdolk@yahoo.com:
Hi all,
I have some 600x450 pixel photos and want to reduce their size to 60K and keep the aspect ratio, GIMP can't do it , anyone know of a Linux photo manipulation SW for batch processing photos?
I do not know of a way to reduce with the goal of changing the file size. I can tell you how to batch convert files to a particular resolution. Save this batch program and run to change images to 600 pixels wide jpeg quality 85. It will take all files you list on the command line.
#!/bin/bash
for input in $@ do base=`echo $input | sed 's/(.*)..*$/\1/'` ## echo "SUF" $SUF "base" $base suffix="600.jpg" /usr/bin/convert $input -resize 600x -quality 85 $base$suffix
done
On Fri, 2008-03-14 at 18:34 -0500, Paul Johnson wrote:
2008/3/14 elk dolk elkdolk@yahoo.com:
Hi all,
I have some 600x450 pixel photos and want to reduce their size to 60K and keep the aspect ratio, GIMP can't do it , anyone know of a Linux photo manipulation SW for batch processing photos?
I do not know of a way to reduce with the goal of changing the file size. I can tell you how to batch convert files to a particular resolution. Save this batch program and run to change images to 600 pixels wide jpeg quality 85. It will take all files you list on the command line.
#!/bin/bash
for input in $@ do base=`echo $input | sed 's/(.*)..*$/\1/'` ## echo "SUF" $SUF "base" $base suffix="600.jpg" /usr/bin/convert $input -resize 600x -quality 85 $base$suffix
done
As for Gimp, when you resize you need to ensure the little chain icon to the right is actually complete by clicking on it. This will keep the aspect ratio for you.
Also, unless I'm mistaken Gimp uses imagemagick to perform some tasks. That may be a possibility for your needs in batch processing.
On Sat, Mar 15, 2008 at 5:05 PM, Da Rock rock_on_the_web@comcen.com.au wrote: [...]
Also, unless I'm mistaken Gimp uses imagemagick to perform some tasks. That may be a possibility for your needs in batch processing.
I don't think that is true - I'm pretty sure GIMP performs most tasks internally or through plug-ins.
GIMP can be used for batch processing as described here: http://www.gimp.org/tutorials/Basic_Batch/
ImageMagick is a separate command-line image processing tool and also very useful in batch processing. There are tons of howtos out there on using ImageMagick. Once I even printed out the output of 'man convert'. Be sure you have plenty of toner/paper before you try that though :)
Chris
On Sat, 2008-03-15 at 17:27 -0500, Chris Mohler wrote:
On Sat, Mar 15, 2008 at 5:05 PM, Da Rock rock_on_the_web@comcen.com.au wrote: [...]
Also, unless I'm mistaken Gimp uses imagemagick to perform some tasks. That may be a possibility for your needs in batch processing.
I don't think that is true - I'm pretty sure GIMP performs most tasks internally or through plug-ins.
GIMP can be used for batch processing as described here: http://www.gimp.org/tutorials/Basic_Batch/
ImageMagick is a separate command-line image processing tool and also very useful in batch processing. There are tons of howtos out there on using ImageMagick. Once I even printed out the output of 'man convert'. Be sure you have plenty of toner/paper before you try that though :)
Chris
Well there you go - you learn something new everyday. :)
I thought I noticed that imagemagick was installed as a dependency with gimp so that led me to that conclusion.
Chris Mohler wrote:
On Sat, Mar 15, 2008 at 5:05 PM, Da Rock rock_on_the_web@comcen.com.au wrote: [...]
Also, unless I'm mistaken Gimp uses imagemagick to perform some tasks. That may be a possibility for your needs in batch processing.
I don't think that is true - I'm pretty sure GIMP performs most tasks internally or through plug-ins.
GIMP can be used for batch processing as described here: http://www.gimp.org/tutorials/Basic_Batch/
ImageMagick is a separate command-line image processing tool and also very useful in batch processing. There are tons of howtos out there on using ImageMagick. Once I even printed out the output of 'man convert'. Be sure you have plenty of toner/paper before you try that though :)
Chris
Even though I like GIMP, it doesn't work with higher quality images and thus isn't that good anymore. I use ImageMagick for anything that needs quality and it is great. A bit of a learning curve but very powerful. For individual images I have started to use CinePaint which will work with HDR images.
Here are some links to get the OP started.
http://www.imagemagick.org/script/command-line-options.php#colorize
http://www.imagemagick.org/Usage/reference.html
http://www.fmwconcepts.com/imagemagick/index.php
elk dolk wrote:
Hi all,
I have some 600x450 pixel photos and want to reduce their size to 60K and keep the aspect ratio, GIMP can't do it , anyone know of a Linux photo manipulation SW for batch processing photos?
Looking for last minute shopping deals? Find them fast with Yahoo! Search. http://us.rd.yahoo.com/evt=51734/*http://tools.search.yahoo.com/newsearch/category.php?category=shopping
Actually, GIMP can do it...sort of. It can reduce the size and/or resolution of the picture, which will also reduce the size of the file. I've used it a number of times. What I do is reduce the picture size / resolution while having a window open to review the file size and it works just fine.
Bradley