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
donghwan
Posts: 2
Joined: 2019-04-12T07:58:01-07:00
Authentication code: 1152

Lighting Effects

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

Hello,

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

* Original image:
Image

* Expected image:
Image

(reference: https://docs.gimp.org/en/plug-in-lighting.html)

Could you help me?

Thanks a lot in advance!

User avatar
fmw42
Posts: 25423
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.

Image

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 \
taj_orig_light.jpg
Image

donghwan
Posts: 2
Joined: 2019-04-12T07:58:01-07:00
Authentication code: 1152

Re: Lighting Effects

Post by donghwan » 2019-04-23T02:13:07-07:00

It works! Thanks a lot.

Post Reply