I've applied the following imagemagick options:
\( +clone -background '#a4a4a4ff' -shadow 80x3+5+5 \) +swap -background none -layers merge +repage
after a scale action to create an imagecache preset. The drupal icon preview works perfectly, but when it's called elsewhere - eg a view - the shadow effect isn't applied, it just shows a hard-edged block instead of a feathered shadow. Any idea why this might be?
Many thanks
Comments
Comment #1
adrinux commentedMy first guess would be that imagemagick is unable to apply the shadow properly because of the image format - you wouldn't be able to apply a nice shadow to an 8-bit gif for example. You might need to change bit depth or file format before applying the shadow.
(Note that drupal 6 image api is unable to change the filename, so while I believe it's possible to change the image format with im_raw, the file extension will remain the original.)
Comment #2
mimpse commentedThanks for getting back so quickly. I fixed the problem - it was due mainly to my own witlessness. I hadn't noticed that the client had snuck in some jpegs, which obviously couldn't carry the transparency required for the shadow blur. Fixed it by changing to:
\( +clone -background '#a4a4a4ff' -shadow 80x3+5+5 \) +swap -background white -matte -layers merge +repage
That is, changing '-background' from 'none' to 'white' and adding '-matte'. This works fine for images displayed on a white background - obviously it doesn't give you transparency in the shadow.
Thanks again and apologies for being dim.