Using ImageMagick to add "drop-shadow" effect to images

Author Message

Felix Laate

Wednesday 28 May 2003 4:18:47 am

Hi all!

I want to add "drop-shadow" effect to all images that are uploaded. ImageMagick can add such an effect. Does anybody know how one could du this in ezPublish?

Any tip would be appreciated..

:-) Felix

Publlic Relations Manager
Greater Stavanger
www.greaterstavanger.com

Bård Farstad

Wednesday 28 May 2003 4:53:41 am

You can use the configure convert with extra command line options in settings/image.ini under the [ShellSettings] block.

Some examples:

A 6 pixels black border around the images:
ConvertExecutable=convert -mattecolor "#00ff00" -frame 6x6

White copyright text in the upper left corner of converted images:
ConvertExecutable=convert -font helvetica -fill white -draw "text 10,20 'Copyright(C) eZ systems'"

Create a yellowish color on converted images:
ConvertExecutable=convert -colorize 0/0/50

Remember to clear the cache and image variations if you want the changes to apply for already existing images.

To remove image variations run the SQL command:
mysql> delete from ezimagevariation;

Enjoy!

--bård

Documentation: http://ez.no/doc

Jo Henrik Endrerud

Wednesday 28 May 2003 5:01:54 am

Hi Felix

eZ publish use convert to convert the images and scale them to the preset sizes. I'm not sure how the "drop-shadow" effect is used, but if you can use it the the convert executable, you can use it in eZ publish.

Open your image.ini file (or one of the .append files) and find the variable ConvertExecutable. This should be set to "convert" by default. Here you can add as many parameters to convert as you want. Ex: If you set "ConvertExecutable=convert -gamma 50" then all images would use 50 as gamma correction.

Jo Henrik Endrerud | System Developer @ Seeds Consulting | http://www.seeds.no

Jo Henrik Endrerud

Wednesday 28 May 2003 5:02:51 am

Hmm... looks like Bård beat me with a quicker reply :)

Jo Henrik Endrerud | System Developer @ Seeds Consulting | http://www.seeds.no

Bård Farstad

Wednesday 28 May 2003 5:05:49 am

Yes, and I even added a community documentation page for it:

http://ez.no/developer/ez_publish_3/documentation/ez_publish_3/howtos/image_effects

--bård

Documentation: http://ez.no/doc

Felix Laate

Wednesday 28 May 2003 5:18:29 am

:-) THANX :-)

Publlic Relations Manager
Greater Stavanger
www.greaterstavanger.com

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.