How to increase opacity of a text shadow?

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?".
Locked
skribb
Posts: 4
Joined: 2015-01-28T05:11:26-07:00
Authentication code: 6789

How to increase opacity of a text shadow?

Post by skribb »

Hi, i have created a text using

Code: Select all

convert -size 500x250 canvas:none -font Roboto-Regular -pointsize 160 -draw "text 90,230 '12.34'" -channel RGBA -blur 0x30 -fill white -draw "text 90,230 '12.34'" clock.png
which renders:
Image

Now, i am happy with the result apart from one thing, and it's the opacity of the shadow. How do i make the shadow less translucent?
The blur amount is correct so it's not a matter of decreasing the blur (which of course will increase the opacity but transform the shadow into a normal text contour).

thanks :D

snibgo
Posts: 13034
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: How to increase opacity of a text shadow?

Post by snibgo »

After blurring, before writing the white text, you can insert something like:

Code: Select all

-channel A -evaluate Multiply 2 +channel
Multiplying by >1 will make it more opaque, <1 will make it more transparent. Or you can use a gamma function, or other magick.
snibgo's IM pages: im.snibgo.com

skribb
Posts: 4
Joined: 2015-01-28T05:11:26-07:00
Authentication code: 6789

Re: How to increase opacity of a text shadow?

Post by skribb »

That's some ockult magick right there! Works perfect, thanks :)

aZooZa
Posts: 1
Joined: 2020-03-17T08:07:05-07:00
Authentication code: 1152

Re: How to increase opacity of a text shadow?

Post by aZooZa »

Could someone expand on this as to how I might change the output to give a current date and time in the image? Epoch or UTC would be a great start.

Thanks!

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

Re: How to increase opacity of a text shadow?

Post by fmw42 »

What is your platform? You likely will need to use some scripting, which depends upon your OS. Use the OS to get the date/time and put it in a variable. Then use the variable in your draw command for the text you want to insert.

Locked