Hi All, I have been Googling my head off but cannot find a method to stream edit all the images in a directory and to resize them. I have a large number of images of up to 3GB in size that I want to put in albums on a website, but before I do this I need to resize them to a more realistic configuration. I know how to do this manually with the GIMP but it becomes tedious for more than a few images. Running CentOS 5 as virtualised under XEN as a web server. TIA ChrisG
Am 15.07.2008 um 21:47 schrieb Chris Geldenhuis:> Hi All, > > I have been Googling my head off but cannot find a method to stream > edit all the images in a directory and to resize them. I have a > large number of images of up to 3GB in size that I want to put in > albums on a website, but before I do this I need to resize them to a > more realistic configuration. > > I know how to do this manually with the GIMP but it becomes tedious > for more than a few images. > > Running CentOS 5 as virtualised under XEN as a web server. >Install ImageMagick and learn about the programs associated with it (convert(1), mogrify(1) etc). cheers, Rainer
On Tue, Jul 15, 2008 at 1:47 PM, Chris Geldenhuis <chris.gelden at iafrica.com> wrote:> Hi All, > > I have been Googling my head off but cannot find a method to stream edit all > the images in a directory and to resize them. I have a large number of > images of up to 3GB in size that I want to put in albums on a website, but > before I do this I need to resize them to a more realistic configuration. > > I know how to do this manually with the GIMP but it becomes tedious for more > than a few images. >imagemagick is what you want. http://www.imagemagick.org/Usage/resize/ for i in *.. blah.> Running CentOS 5 as virtualised under XEN as a web server. > > TIA > > ChrisG > _______________________________________________ > CentOS mailing list > CentOS at centos.org > http://lists.centos.org/mailman/listinfo/centos >-- Stephen J Smoogen. -- BSD/GNU/Linux How far that little candle throws his beams! So shines a good deed in a naughty world. = Shakespeare. "The Merchant of Venice"
Chris Geldenhuis wrote:> Hi All, > > I have been Googling my head off but cannot find a method to stream > edit all the images in a directory and to resize them. I have a large > number of images of up to 3GB in size that I want to put in albums on > a website, but before I do this I need to resize them to a more > realistic configuration. > > I know how to do this manually with the GIMP but it becomes tedious > for more than a few images.imagemagick can do this, its a command line batch image editor. its a little tricky to figure out. I note its in the base Centos5 repository. docs on http://www.imagemagick.org/script/index.php
Chris Geldenhuis wrote:> Hi All, > > I have been Googling my head off but cannot find a method to stream > edit all the images in a directory and to resize them. I have a large > number of images of up to 3GB in size that I want to put in albums on > a website, but before I do this I need to resize them to a more > realistic configuration. > > I know how to do this manually with the GIMP but it becomes tedious > for more than a few images. > > Running CentOS 5 as virtualised under XEN as a web server. >Try ImageMagick - yum info ImageMagick. It has lots of slick tools for image manipulation. -- Toby Bluhm Alltech Medical Systems America, Inc. 30825 Aurora Road Suite 100 Solon Ohio 44139 440-424-2240 ext203
On Tue, Jul 15, 2008 at 09:47:26PM +0200, Chris Geldenhuis wrote:> I have been Googling my head off but cannot find a method to stream edit > all the images in a directory and to resize them. I have a large number of > images of up to 3GB in size that I want to put in albums on a website, but > before I do this I need to resize them to a more realistic configuration. > > I know how to do this manually with the GIMP but it becomes tedious for > more than a few images. > > Running CentOS 5 as virtualised under XEN as a web server.I wrote a shell script to do just that, attached below. It requires a couple of readily available command line tools from the packages: netpbm-progs libjpeg And of course you can tune the scaling and quality to suit your needs. HTH Chris -- Chris Payne chris.payne at triumf.ca TRIUMF ATLAS Tier-1 System Administrator - Networking TRIUMF +1 604 222 7554 4004 Wesbrook Mall, Vancouver, BC, V6T2A3, CANADA #!/bin/sh for file in $* ; do base=`basename $file` # change depending on your camera file extension prefix=`echo $base | sed -e "s/\.jpg//i"` # prefix=`echo $base | sed -e "s/\.jpeg//i"` if [ -f $prefix.small.jpeg ] ; then echo skippin $file else echo shrinkin $file jpegtopnm $file | pnmscale .35 | cjpeg -quality 75 > $prefix.small.jpg fi done
on 7-15-2008 12:47 PM Chris Geldenhuis spake the following:> Hi All, > > I have been Googling my head off but cannot find a method to stream edit > all the images in a directory and to resize them. I have a large number > of images of up to 3GB in size that I want to put in albums on a > website, but before I do this I need to resize them to a more realistic > configuration. > > I know how to do this manually with the GIMP but it becomes tedious for > more than a few images. > > Running CentOS 5 as virtualised under XEN as a web server. >Have you looked at Jalbum? http://jalbum.net/ I think it is java, and they have it for windows, linux and mac. It can even do the thumbnails. And please don't yell at me with your subject! ;-P -- MailScanner is like deodorant... You hope everybody uses it, and you notice quickly if they don't!!!! -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 258 bytes Desc: OpenPGP digital signature URL: <http://lists.centos.org/pipermail/centos/attachments/20080715/5e406a64/attachment-0002.sig>
Chris Geldenhuis
2008-Jul-15 20:01 UTC
[CentOS] SERIOUSLY OT STREAM EDITING IMAGES - SOLVED
Chris Geldenhuis wrote:> Hi All, > > I have been Googling my head off but cannot find a method to stream > edit all the images in a directory and to resize them. I have a large > number of images of up to 3GB in size that I want to put in albums on > a website, but before I do this I need to resize them to a more > realistic configuration. > > I know how to do this manually with the GIMP but it becomes tedious > for more than a few images. > > Running CentOS 5 as virtualised under XEN as a web server. > > TIA > > ChrisG > _______________________________________________ > CentOS mailing list > CentOS at centos.org > http://lists.centos.org/mailman/listinfo/centos >OOPS - Found it using different keywords "gimp command line" Thanks ChrisG
Chris Geldenhuis wrote:> I have been Googling my head off but cannot find a method to stream edit > all the images in a directory and to resize them. I have a large number > of images of up to 3GB in size that I want to put in albums on a > website, but before I do this I need to resize them to a more realistic > configuration. > > I know how to do this manually with the GIMP but it becomes tedious for > more than a few images.Install ImageMagick and use convert. Something like this will get you started. # cd /path/to/pics; mkdir resized # for i in *.jpg; do convert -resize 50% $i resized/$i; done Regards, Max