Santanu
Santanu

General

photo album : imagemagick (part -1)

Another technote on Magick

A description of cover image.

Quick and dirty way of creating photo album with imagemagick, creating

images with black border as it looks good for all

imagemagick bash
#!/bin/csh
# Create the output directory if it doesn't exist
if (! -d /tmp/foo100) then
mkdir -p /tmp/foo100
endif
# Iterate over each jpg file in the current directory
foreach file ( [0-9]*.jpg )
# Get the width and height of the image
set w = `identify -format "%w" $file`
set h = `identify -format "%h" $file`
# Resize the image based on its orientation and add a black border
if ($w > $h) then
convert $file -thumbnail 500x -bordercolor black -border 1 /tmp/foo100/$file
else
convert $file -thumbnail x500 -bordercolor black -border 1 /tmp/foo100/$file
endif
end

Read Next

4 Nov   2005

Part -2

Php Script continue

10 Nov   2005

Diwali at Paris

Other kind of Fireworks