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.

eZ debug

Timing: Jan 18 2025 11:27:42
Script start
Timing: Jan 18 2025 11:27:42
Module start 'layout'
Timing: Jan 18 2025 11:27:42
Module start 'content'
Timing: Jan 18 2025 11:27:43
Module end 'content'
Timing: Jan 18 2025 11:27:43
Script end

Main resources:

Total runtime1.0061 sec
Peak memory usage4,096.0000 KB
Database Queries68

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0064 589.4844152.6406
Module start 'layout' 0.00640.0037 742.125039.4766
Module start 'content' 0.01000.9947 781.6016608.5938
Module end 'content' 1.00470.0014 1,390.195316.1250
Script end 1.0060  1,406.3203 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00360.3582160.0002
Check MTime0.00160.1573160.0001
Mysql Total
Database connection0.00140.135310.0014
Mysqli_queries0.943693.7904680.0139
Looping result0.00070.0651660.0000
Template Total0.969696.420.4848
Template load0.00200.195420.0010
Template processing0.967696.180020.4838
Template load and register function0.00010.011910.0001
states
state_id_array0.00180.174910.0018
state_identifier_array0.00100.101220.0005
Override
Cache load0.00170.1681370.0000
Sytem overhead
Fetch class attribute can translate value0.00170.164430.0006
Fetch class attribute name0.00130.130080.0002
XML
Image XML parsing0.00150.153930.0005
class_abstraction
Instantiating content class attribute0.00000.0020100.0000
General
dbfile0.00100.1012230.0000
String conversion0.00000.000840.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
4content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
6content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
10content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
4content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 26
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs