Postcard-like effects

(redirected from T.VerySpecialEffects)

The Mini gallery for PmWiki can also display drop shadows via CSS. See CSS shadows with Mini.

This page shows how we can have thumbnails with drop shadows with ImageMagick's convert. Thumbnails can be framed with a white border of 3 px, optionally slightly rotated, and a shadow is dropped.

Note that ImageMagick may not be available on cheap and/or shared hostings.

How do you like this (shadows, random rotation -3..+3 degrees):
Peablue_October_2007_Osaka_Japan.jpg: 598x400, 35k (2009-07-23 00:58) Hurricane_Dennis_on_July_7_2005_1550_UTC.jpg: 498x640, 95k (2009-02-13 12:30) Aerogelbrick.jpg: 606x640, 62k (2009-02-13 12:30) Snow_crystals.jpg: 800x629, 108k (2009-02-13 12:30) STS_114_day_before_launch.jpg: 800x532, 77k (2009-02-13 12:30) Achelousaurus_dinosaur.png: 640x640, 575k (2009-02-13 12:30)

Or standing still, but also shadowed:
NMMP_dolphin_with_locator.jpeg: 532x640, 132k (2009-02-13 12:30) Kaernten_CoA.svg.png: 566x640, 200k (2009-02-13 12:30) Fitz_Roy_1.jpg: 480x640, 74k (2009-02-13 12:30) Hubble2005-01-barred-spiral-galaxy-NGC1300.jpg: 800x456, 56k (2009-02-13 12:30) Aerogelbrick.jpg: 606x640, 62k (2009-02-13 12:30) Fractal_Broccoli.jpg: 800x600, 73k (2009-02-13 12:30)

I here you : Wait now, how did you do it?!? Magic!

Here is what I have in farmconfig.php:

$ThumbList['IMCLTpl']['rand6'] = '{%x} -size "{%W}x{%H}" "{%P}"[0] -thumbnail "{%w}x{%h}" -bordercolor white -border 3 -bordercolor grey60 -border 1 -background none -rotate {%RAND-6+6} -background black ( +clone -shadow 60x4+3+3 ) +swap -background "{%c}" -flatten -resize "{%w}x{%h}!" -unsharp 0 -quality "{%q}" "{%p}"';

$ThumbList['IMCLTpl']['rand3'] = str_replace('{%RAND-6+6}', '{%RAND-3+3}', $ThumbList['IMCLTpl']['rand6']);
$ThumbList['IMCLTpl']['rand10'] = str_replace('{%RAND-6+6}', '{%RAND-10+10}', $ThumbList['IMCLTpl']['rand6']);
$ThumbList['IMCLTpl']['right2'] = str_replace('{%RAND-6+6}', '2', $ThumbList['IMCLTpl']['rand6']);
$ThumbList['IMCLTpl']['shadowframe'] = str_replace('-background none -rotate {%RAND-6+6}', '', $ThumbList['IMCLTpl']['rand6']);

Then, I can use the parameter imcl=rand3, imcl=right2, etc.

See the ImageMagick reference manual at http://www.imagemagick.org/Usage/.