If I can get this figured out - I can make a simple script to make it transparent. I am just lost as to how to determine what color it is.
![Image](http://i66.tinypic.com/9scqht.jpg)
Code: Select all
magick in.png -format %[hex:p{0,99}] info:
Code: Select all
magick KEWX_L2_VEL_colorized.gif -format p{0,3769}] info:
Code: Select all
p{0,3769}]
Code: Select all
magick KEWX_L2_VEL_colorized.gif -transparent #5BD13D KEWX_L2_VEL_colorized.gif
Code: Select all
magick in.png -format %[hex:p{0,99}] info:
Code: Select all
magick KEWX_L2_VEL_colorized.gif -format %[hex:p{0,3769}] info:
Code: Select all
magick KEWX_L2_VEL_colorized.gif -format %[hex:p{0,3769}] info:
In a BAT file, you need to double the %.dholcomb9711 wrote:(I used notepad to save it as a batch file and ran it):
Code: Select all
magick KEWX_L2_VEL_colorized.gif -transparent #4BCB2AFF KEWX_L2_VEL_colorized.gif
Code: Select all
for /F "usebackq" %%L in (`magick ^
KEWX_L2_VEL_colorized.gif ^
-format "mycol=%%[hex:p{0,3769}]\n" ^
info:`) do set %%L
magick KEWX_L2_VEL_colorized.gif -transparent #%mycol% KEWX_L2_VEL_colorized.gif
Since you're using IM7, in many cases you can do this sort of thing as a single command by reading the pixel's color and applying it directly in the operation where you need it. This should give you a result like your example...dholcomb9711 wrote: ↑2018-09-19T15:05:35-07:00This works when I manually type it, but I should be able to inject the variable in there to automate it somehow.Code: Select all
magick KEWX_L2_VEL_colorized.gif -transparent #4BCB2AFF KEWX_L2_VEL_colorized.gif
Code: Select all
magick KEWX_L2_VEL_colorized.gif -transparent %[pixel:p{0,3769}] KEWX_L2_VEL_colorized.gif
Ah, I didn't know we could do that. Very useful. Thanks, GeeMack.GeeMack wrote:-transparent %[pixel:p{0,3769}]
That works in Windows with or without the quotes. Either way requires doubling the percent sign if used in a BAT script, of course.