Archive for July, 2007
Bulk Image Processing for websites using Image Magick
You might be developing a site to show off someone’s photos. Or maybe you are building an online store and you have hundreds of images to process. Well we all love GIMP but re-sizing 500 photos for thumbnails would give anyones mouse hand a cramp if you did them one by one.
When you have lots and lots of photos to process you will want to set aside GIMP and use ImageMagick. There are binary versions available for Unix/Windows/OSX and source code versions available for those of you who prefer to compile your own. This is Open Source, free for you to use software.
Directions for installing ImageMagick (* see note for OSX at bottom of post )
Now I’m old school and often work from a command line or terminal. Those of you who would rather have a graphical interface might want to check out JMagick, a Java interface for working with ImageMagick. This is just an interface, ImageMagick will need to be properly installed first for the interface to work.
Once you have it up and running you can batch process your images.
For instance if you want to create thumbnails for 100 jpg images:
Open up a terminal window ( Command in Windows Terminal in OSX )
cd to the directory with the images
type at the command prompt and hit enter
convert *.jpg -resize 100 thumbnail%03.png
This will convert all files ending in .jpg in this directory to png files that have a width of 100 pixels and are named thumbnail000.png to thumbnail099.png.
You can convert jpgs to png to gif and any which way between them.
You can do any of the following conversions to the files:
[-adaptive-blur • -adaptive-resize • -adaptive-sharpen • -adjoin • -affine • -annotate • -antialias • -append • -authenticate • -auto-orient • -average • -backdrop • -background • -bias • -black-point-compensation • -black-threshold • -blue-primary • -blur • -border • -bordercolor • -borderwidth • -cache • -channel • -charcoal • -chop • -clip • -clip-mask • -clip-path • -clip-path • -clone • -coalesce • -colorize • -colormap • -colors • -colorspace • -combine • -comment • -compose • -composite • -compress • -contrast • -contrast-stretch • -convolve • -crop • -cycle • -debug • -deconstruct • -define • -delay • -delete • -density • -depth • -descend • despeckle • -displace • -display • -dispose • -dissolve • -distort • -dither • -draw • -edge • -emboss • -encoding • -endian • -enhance • -equalize • -evaluate • -extent • -extract • -fill • -filter • -flatten • -flip • -flop • -font • -foreground • -format • -format • -frame • -frame • -fuzz • -fx • -gamma • -gaussian-blur • -geometry • -gravity • -green-primary • -help • -iconGeometry • -iconic • -identify • -immutable • -implode • -insert • -intent • -interlace • -interpolate • -label • -lasso • -lat • -layers • -level • -limit • -linear-stretch • -linewidth • -list • -log • -loop • -magnify • -map • -map • -mask • -matte • -mattecolor • -mask • -median • -metric • -mode • -modulate • -monitor • -monochrome • -morph • -mosaic • -motion-blur • -name • -negate • -noise • -normalize • -opaque • -ordered-dither • -orient • -page • -paint • -path • -pause • -pause • -pen • -ping • -pointsize • -polaroid • -posterize • -preview • -print • -process • -profile • -quality • -quantize • -quiet • -radial-blur • -raise • -random-threshold • -recolor • -red-primary • -regard-warnings • -region • -remote • -render • -repage • -resample • -resize • -reverse • -roll { • -rotate • -sample • -sampling-factor • -scale • -scene • -scenes • -screen • -seed • -segment • -separate • -sepia-tone • -set • -shade • -shadow • -shared-memory • -sharpen • -shave • -shear • -sigmoidal-contrast • -silent • -size • -sketch • -snaps • -solarize • -splice • -spread • -stegano • -stereo • -storage-type • -strip • -stroke • -strokewidth • -support • -swap • -swirl • -text-font • -texture • -threshold • -thumbnail • -tile • -tile-offset • -tint • -title • -transform • -transparent • -transparent-color • -transpose • -transverse • -treedepth • -trim • -type • -undercolor • -unique-colors • -units • -unsharp • -update • -verbose • -version • -view • -vignette • -virtual-pixel • -visual • -watermark • -wave • -white-point • -white-threshold • -window • -window-group • -write]
There are hundreds of detailed examples here: ( ImageMagick Examples )
*Note for OSX installations:
You will need to edit your .bash_profile file. It is in your home directory, and add the following lines.
#ImageMagick Stuff
export MAGICK_HOME=”/usr/local/ImageMagick”
PATH=$PATH:$MAGICK_HOME/bin
export PATH
export DYLD_LIBRARY_PATH=”$MAGICK_HOME/lib”
# end Image Magick Stuff
Save the file, close the terminal window and open a new one to cause .bash_profile to run.
How to add a Google Calendar to your site

Log onto your Google account and go to GMail.
In the upper left corner is a Calendar link – click it
In the left sidebar is a small link at the bottom ‘Manage calendars’ – click it
Up will come a list of the calendars you’ve created
Click on the link for the calendar you wish to add to your sidebar
Near the bottom you will see a section ‘Calendar Adress:’ and ‘xml’ ‘ical’ ‘html’
Click on the HTML button.
A pop up window will appear and you have two choices. The first is a direct link to your calendar
The second is a ‘configuration tool’ – Click that one
A page will appear with all sorts of details you can select – calendar format, size, &c.
Set things up how you like and click the ‘Update URL’ button.
Code will appear in a box ’2. Add the calendar HTML to your page’
Highlight and select all the text in that box and paste it into notepad or some other
text tool you like to use.
In Blogger go to Template->Add Page Element->HTML/JavaScript – ‘Add to Blog’
and paste your text into the box and save
In WordPress, go to Presentation->Themes->Theme Editor and paste it into your sidebar in an
appropriate spot.
Or you can just add it to any HTML page by pasting the text where you want the calendar to be.
You can see an example of this at Herself’s Houston Garden

These are useful for websites and blogs about local hobbies where there are events that will interest your readers. Or for blogs about clubs and organizations such as blogs for local photography clubs. Google calendars are nice since people interested in specific events can then just import them to their own Google calendar.
I found I needed to widen the sidebars in the blogs I put calendars into to about 340px. But I’ve been widening websites to 1000px any how since only about 10% of internet users are still using 800×600 displays.