I knew this would get some peeks. So, my pictures are huge. I can't figure out how to make them smaller. Help please.
-K-
I knew this would get some peeks. So, my pictures are huge. I can't figure out how to make them smaller. Help please.
-K-
Use photo editing software to resize the pictures.
I'll second the Gimp comment. I use it to crop and resize my pictures, and it will do a lot more. I usually choose it over Photoshop which I also have access too.
If you simply want to resize pictures for the web and have a fast internet connection, many photo hosting services will resize them for you. I use photobucket, and have it set so that it will resize anything I upload to 800x600. If you do it that way, you still have to upload the full size picture (could be a few megs vs a few 100k for a 800x600). For uploading a bunch of photos, that can mean a large difference. I need write a script to batch resize pictures before uploading, that would save some time.![]()
My bee blog - http://topbarbees.wordpress.com
kawayanan
I get the impression you're using linux
check out mogrify
great for batch processing pics
Dave
I use both Linux and Windows (my wife is used to Win, and I still play games there too sometimes).
mogrify is part of ImageMagick and once you reminded me of it I realized I have already written a script that does it.ImageMagick interfaces well with lots of languages. I had used it in a perl script I wrote a long time ago to take a directory of photos, make thumbnails, and write a HTML page displaying them (an automated website update type thing). Now I just have to find it.
ImageMagick is also available on Windows and so is perl (ActivePerl). If I can find the script, maybe I put it up somewhere so if anyone wants they can use it (just don't laugh at my ugly perl - I'm self taught)
My bee blog - http://topbarbees.wordpress.com
>>just don't laugh at my ugly perl - I'm self taught
I wasn't aware there was any other kind of perl
Dave
Ok, if anyone is interested, I found my old script and edited it so that it just makes a 160x120 thumbnail and 800x600 resized image. It will do this for any jpg in the directory it is run in. If you need to resize a lot of pictures, it will make the job much easier.
This will run on windows as long as you have two things installed. You need Imagmagick and ActivePerl. I think it should also run an any other platform that has both perl and Imagemagick installed.
Here is the text of the script. You can just copy this text into a normal text file and name it resize.pl (or whatever you want ending with .pl)
It assumes that your jpeg images are named "xxxxx.JPG". If your images use lowercase file extensions (xxxx.jpg), you will need to change the line "@jpgs = <*.JPG> ;" to "@jpgs = <*.jpg> ;" Imagemagick is also smart enough to handle images that are rotated (meaning 800x600 vs 600x800). What it will actually do is make a thumbnail that is 160 pixels on its longest side and a resized image that is 800 pixels on its longest side. The aspect ratio will be conserved. If you want the thumbnails or images to be a different size, just change the "Resize('800x800')" or "Thumbnail('160x160')" to what you want.Code:# use Image::Magick ; @jpgs = <*.JPG> ; mkdir "thumbs" ; mkdir "800x600" ; $pic_num = $#jpgs ; $pic_count = $pic_num +1 ; for ($a = 0 ; $a <= $pic_num ; $a++){ $count = $a +1 ; $thumbname = "thumbs/$jpgs[$a]" ; $resize = "800x600/$jpgs[$a]" ; print "Working on $thumbname ($count of $pic_count)\n" ; $x = $thumb = Image::Magick->new ; $x = $thumb->Read($jpgs[$a]) ; $x = $thumb->Thumbnail('160x160') ; $x = $thumb->Write($thumbname) ; $y = $image = Image::Magick->new ; $y = $image->Read($jpgs[$a]) ; $y = $image->Resize('800x800') ; $y = $image->Write($resize) ; }
Kawayanan
My bee blog - http://topbarbees.wordpress.com
thanks guys!
-K-
Bookmarks