Page 1 of 1
How could I go about creating a specific lighting effect?
Posted: 2016-12-09T12:39:35-07:00
by timothympace
I was wondering if anyone could offer me an example of a CLI command to use with convert to create an image as close to the below image as possible (minus the line across the middle and the "AT" text). I am just interested in the backdrop.
I am trying to create an API that can generate a backdrop like this and then add sports team logos in dynamically to create matchup banners/posters. I want to generate the backdrop dynamically so I can create posters of different sizes as needed.
Anyone have any advice?
Edit:
Version is: ImageMagick 6.8.9-9 Q16 x86_64
Platform is: Ubuntu
Re: How could I go about creating a specific lighting effect?
Posted: 2016-12-09T12:53:51-07:00
by fmw42
It looks like a form of white vignetting. See -vignette.
http://www.imagemagick.org/script/comma ... p#vignette
http://www.imagemagick.org/Usage/transform/#vignette
Or see my 3 vignette scripts for unix at the link below.
Please always provide your IM version and platform when asking questions on this forum, since syntax may vary.
Re: How could I go about creating a specific lighting effect?
Posted: 2016-12-09T13:01:33-07:00
by snibgo
Or it could be done with a gradient.
Re: How could I go about creating a specific lighting effect?
Posted: 2016-12-09T13:07:36-07:00
by timothympace
I tried doing it with a gradient, but couldn't quite get it right... I added the version/platform to my original post, would you be willing to provide an example of the gradient that would produce something close to this? Same for vignette? In the mean time I will play around with them some more and see if I can get anything.
Re: How could I go about creating a specific lighting effect?
Posted: 2016-12-09T13:39:47-07:00
by snibgo
I would use gradient features introduced at 6.9.2-5, so not available in your version. See
http://www.imagemagick.org/script/gradient.php
However, it could still be done with a "radial-gradient", then resized to suit, and "+level" to give whatever light gray and dark gray you want. See the example on that page.
Re: How could I go about creating a specific lighting effect?
Posted: 2016-12-09T16:19:02-07:00
by fmw42
If on unix, try something like this and adjust the blur and radii and blend as desired.
Code: Select all
width=240
height=360
radii=90 #percent of width and height
blur=50 #blur sigma
blend=30 #percent mix (30 for one and 70 for the other)
cx=`convert xc: -format "%[fx:$width/2]" info:`
cy=`convert xc: -format "%[fx:$height/2]" info:`
rx=`convert xc: -format "%[fx:$radii*$width/200]" info:`
ry=`convert xc: -format "%[fx:$radii*$height/200]" info:`
convert -size ${width}x${height} xc:black \
\( -clone 0 -fill black -colorize 100 -fill white \
-draw "translate $cx,$cy ellipse 0,0 $rx,$ry 0,360" -blur 0x$blur -auto-level \) \
-compose blend -define compose:args=$blend -composite vignette_effect.png
Sorry I do not know how to do this in Windows syntax.
Re: How could I go about creating a specific lighting effect?
Posted: 2016-12-11T17:13:55-07:00
by anthony
I would create a dark grey background and blur with a 'black' virtual pixel setting...
Or add a black border and blur (a little thicker).
There are lots of ways to skin a cat, and what method you use depends
on what you want that skin for, and how messy you like the results!