PDA

View Full Version : [SOLVED] Program Needed to Shrink ALOT of Images



dhtseany
November 14th, 2008, 04:37 PM
Hey all,
I want to write a program that I will use to take images that are ~1MB in size and shrink them to ~300kb. The following are the requirements for the app:

1) To start it must be Window$ based (I know, I know...;))
2) Must be stand alone (i.e. I would like to avoid a ton of extra packages to be installed with it. .NET and VB should be ok though)
3) Must be able to handle a ton of images (500+) at once
4) Must be able to handle JPG. PNG, GIF and BMP would be a plus but not required.

I have heavy experience using PHP, HTML, and MySQL. I have below average skills using Java and Basic.

So where can I start? Of course I don't expect anyone to write it for me :) I just need help getting pointed in the right directions.

Peace
Sean

rjack
November 14th, 2008, 04:50 PM
All you need is ImageMagik's convert.

Windows binary: http://www.imagemagick.org/script/binary-releases.php#windows

You can run it in a batch script, but I'd prefer to install cygwin and use the ol' good bash.

Kilon
November 14th, 2008, 04:59 PM
Start from here.Google Magic.

http://forums.sun.com/thread.jspa?threadID=522483
http://www.java2s.com/Code/CSharp/2D-Graphics/ShrinkImage.htm
http://www.componenthouse.com/article-20
http://www.kitfox.com/javaOne2007/javaOne-notes.pdf
http://www.informit.com/content/images/0201700743/samplechapter/rodriguesch7.pdf
http://www.corewebprogramming.com/PDF/ch10.pdf
http://www.java-tips.org/java-se-tips/java.awt.image/shrinking-an-image-by-skipping-pixels.html
http://www.digitalsanctuary.com/tech-blog/java/how-to-resize-uploaded-images-using-java.html
http://www.koders.com/java/fid575707A0F7E6FE0E56C7CEAB21CDAFFDC9774C8D.aspx

gpsmikey
November 14th, 2008, 05:04 PM
See if the FREE irfanview meets your needs.
http://www.irfanview.com - freeware and the guy that wrote it is very good with his support and upgrades to it. It has a batch mode where you can do all sorts of things to the selected images (including "tweaking" them as you shrink them and specifying the output directory). Almost everyone I know on the windows side who works with images has it (they may also have photoshop etc, but this is sort of the "swiss army pocket knife").

mikey

Kevbert
November 14th, 2008, 05:24 PM
I use PixResizer for batch re-sizing in Windows which can be found here (http://bluefive.pair.com/pixresizer.htm).

juicymixx
November 14th, 2008, 06:42 PM
See if the FREE irfanview meets your needs.
http://www.irfanview.com ...


Irfanview definitely fits the bill. It can batch downsize all the images in a directory pretty quickly...

If you really want to write a program, then you'll have to learn about the different types of images you want to work with, and methods of reducing their filesize in an acceptable way (meaning, how bad do you want to downgrade the actual image).

drubin
November 15th, 2008, 12:06 PM
Hey all,
1) To start it must be Window$ based (I know, I know...;))
http://www.vso-software.fr/products/image_resizer/

dhtseany
November 16th, 2008, 03:40 PM
Hey guys thanks alot! I'm gonna play around with this today and see which works best.

I'll post back my pick :)

Peace
Sean

iponeverything
November 16th, 2008, 04:15 PM
If you see the light and want to do under linux:


ls *jpg |awk '{print "convert "$1" -resize 30% small-"$1}'|sh &

This command will resize all the images in a directory and give you a small version with a prefix of "small-" so for instance you will have dscn2345.jpg (the orginal) and small-dscn2345.jpg (the shrunk one)

Change the % for more or less shrinkage.

dhtseany
November 19th, 2008, 01:14 AM
If you see the light and want to do under linux:


ls *jpg |awk '{print "convert "$1" -resize 30% small-"$1}'|sh &

This command will resize all the images in a directory and give you a small version with a prefix of "small-" so for instance you will have dscn2345.jpg (the orginal) and small-dscn2345.jpg (the shrunk one)

Change the % for more or less shrinkage.

Haha thanks for the tip; I'll give it a shot. It had to be Windows based due to my customer is running XP. I set him up with the IRview and he loves it.

Thanks
Sean