Many digital cameras produce JPEG image files over 1MB by default - for
someone surfing the Internet, downloading a directory of such images over
a normal modem would take hours (too long) and would consequently lose most
of your audience. For many web applications, smaller and lower quality photographs
are at least acceptable and often better than the original.
Most existing image editing programs like The Gimpoffer interactive dialogues that
enable you to choose the most appropriate compromise between file size and
image quality. However, editing all your photographs by hand just to produce
a copied set with smaller file sizes is a waste of effort when other programs
can automate this task for you. Apple Mac owners can use the batch features
of iPhotowhich is free with Mac
OS X, but for everyone else, you might like to try this Java application called
JPEGDirCopy from Jeremy Parsons.
The JPEGDirCopy Java application has both a command-line and a GUI interface. The GUI is shown above and is very clunky by the standards of normal distributed software, but it works - just. Download the JPEGDirCopy.jar from the software download directory, ensure you have a working version of Java2, and then choose either the command line or the GUI interfaces.
Once all the values have been set, and you have pressed each of the left
hand buttons (important), then press the "Start Copying" button and watch
it go. I use the JPEG copier to produce amazingly compressed pictures for
email and web publishing though certain scenes compress much better than
others.
java -cp JPEGDirCopy.jar embl.ebi.jparsons.JPEGDirCopy original_directory_name copied_directory_name width_in_pixels height_in_pixels quality(0.1 - 0.9, 0.75 default) maximise_compatibility(true|false)
A good compromise between file size, quality, and the expected available screen space of a typical Web surfer would be to use an image size of 800 by 700 pixels and a JPEG quality level of 0.70 to give a typical file size of 70 KB though highly detailed photographs of forests, complex textures etc. would be around 100KB and sunsets or big blue skies around 30KB.
Be warned that when the program runs, it makes a smaller copy of every JPEG file that it finds in all the subdirectories of the first folder that you specify so avoid specifying the top of big directory trees and also avoid copying recursively (where the output folder is a subdirectory of the input folder). The program should never delete a single file so it should not really be dangerous.
The program is written in Java which became famous for allowing people to download programs to run safely in their Web browsers, often games or scientific viewers on any kind of computer. However, because this program runs outside a browser and needs to be able to read and write files on local disks, this Java program is not a Java applet but a full Java application and it needs a Java Runtime Environment (JRE) in which to run. This is no problem because Sun Microsystems gives away the JRE for all kinds of computers and you can download the very latest version (Java 2 JRE 1.4) from http://java.sun.com/ By the way, the Java JRE is so useful for games and many other programs that its worth installing anyway.
Littlest Home Page | Jeremy Parsons' Home Page |