Forums / General / Using ImageMagick to add "drop-shadow" effect to images

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

eZ debug

Timing: Jan 29 2025 23:46:57
Script start
Timing: Jan 29 2025 23:46:57
Module start 'content'
Timing: Jan 29 2025 23:46:57
Module end 'content'
Timing: Jan 29 2025 23:46:57
Script end

Main resources:

Total runtime0.1526 sec
Peak memory usage2,048.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0052 588.0703180.8203
Module start 'content' 0.00520.0042 768.890697.8984
Module end 'content' 0.00940.1432 866.7891526.0000
Script end 0.1525  1,392.7891 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00322.1049200.0002
Check MTime0.00120.8059200.0001
Mysql Total
Database connection0.00060.421310.0006
Mysqli_queries0.106669.84421410.0008
Looping result0.00100.63961390.0000
Template Total0.142893.510.1428
Template load0.00080.554410.0008
Template processing0.141992.989010.1419
Override
Cache load0.00060.372110.0006
Sytem overhead
Fetch class attribute can translate value0.00060.401610.0006
XML
Image XML parsing0.00020.128410.0002
General
dbfile0.01177.6871200.0006
String conversion0.00000.002830.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs