Photo Gallery

Recently, I created a photo gallery with my personal photos. The gallery is fashioned only as preview for fast look-up. It contains only non-processed images. I think that it would be better than current state when I'm buffering images somewhere on disk(s). Images which waits for detailed image processing (panoramas, various image operations, etc), can be public available by this way.

The gallery is generated as a static web pages by llgal. The generation is very fast. It needs only manually download images from camera and running of some scripts. I have checked also photon which do similar job, but neither full-evening hacking didn't fit my requirements on
appearance and functionality.

All images, in the galleries, are generated from RAW Canon files by dcraw and convert (Imagemagic). As output format, I choose JPEG to importantly reduce image sizes for fast browsing. The quality is poor, but images are small.

for A in *.CR2;
# from RAW to 1000x666 pixel JPG
dcraw -c -f -q 3 -w -h $A | convert - -geometry 1000 ${A%CR2}jpg
# add copyright
composite -dissolve 30 -gravity SouthEast copyright.png ${A%CR2}jpg ${A%CR2}jpg

An important parameter for dcraw is -w which set color temperature from parameters supplied by a camera. It is important: when I have set the color temperate to a different one, my older images are toned to red. That is because of dcraw default uses 6500 (for D65 illuminant). I have set the temperature according of Sun (5700) which is bad idea because of illuminant D65 have no thermal spectral flux density.

I'm adding a signature to every image as L.Lessig recommends. The signature itself is created as a muster by the command:

convert -size 80x17 xc:none -font Courier-Bold -pointsize 14 \
-stroke black -strokewidth 5 -annotate +4+12 '© F.Jetel' \
-fill white -blur 0x4 -stroke none -annotate +4+12 '© F.Jetel' \

and added with composite command (above in processing loop) to images. The signature image has transparent background (xc:none), and some decoration (options -stroke and -blur). The signature is partially transparent when it added to images to suppress thickness (-dissolve).

For documentation purposes it is important include useful information about images. Unfortunately, JPEGs created by dcraw conversion has removed an important information as a time of exposure etc. So I'm adding selected exif information to JPEGs via exiftool:

exiftool -tagsfromfile "%d%f.CR2" -r -ext jpg .

From files prepared by the described way, it is possible create of a gallery by the command:

llgal -f --exif "FileName,ImageWidth,ImageHeight,CameraModelName,CreateDate,ExposureTime,ISO,FocalLength,LensType" --title "Geminidy 2009" --cf

Also, for updating of list of galleries, I'm using the command:

llgal -L -S --exclude copyright.png --title "Photo Gallery"

That's all. Please, change the name in copyright when you will copy my scripts to your galleries.
Post a Comment