Lighting Effects

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
Posts: 1
Joined: 2019-04-12T07:58:01-07:00
Authentication code: 1152

Lighting Effects

Post by donghwan » 2019-04-12T08:10:49-07:00


I simply want to make a simple script for lighting effects such as follows:

* Original image:

* Expected image:


Could you help me?

Thanks a lot in advance!

User avatar
Posts: 24737
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Lighting Effects

Post by fmw42 » 2019-04-20T21:46:07-07:00

Here is one way. Darken the image, draw a white ellipse at the top left corner on a black background that is rotated 45 degrees. Blur it. Then add it onto the darkened image with some transparency to control its brightness.


Unix syntax

Code: Select all

convert taj_orig.jpg +level 0x70% \
\( -clone 0 -fill black -colorize 100 \
-fill white -draw "rotate 45 ellipse 0,0 200,25 0,360 " \
-blur 0x25 -alpha set -channel a -evaluate set 65% +channel \) \
-compose plus -composite \

Post Reply