I have what seems to be a super simple task, yet I have spent hours looking through this forum as well as the IM docs trying to find a solution. Having tried 100s of variations I am still stumped.
I am starting with a PNG image (it's a map tile) that has areas full of color and a transparent background everywhere else:
https://www.dropbox.com/s/4ssdbehbbl0mm ... c.png?dl=0
I want to adjust the transparency of the colorful area, making it more transparent. When I run the command I have assembled I succeed in setting the transparency of the colorful section, however it also sets the previously totally transparent sections to the new level as well making those areas less transparent and filling in a gray background.
Code: Select all
convert pre-opac.png -channel A -evaluate set 39% post-opac.png
https://www.dropbox.com/s/01crbvjyvza9c ... c.png?dl=0
Looking at my code, it makes sense. As I read it, I'm setting the Alpha channel to 39% everywhere. So how can I dial down the opacity across the board so that the 0 areas stay at 0 and everything else comes down 39%?
I'm running
Version: ImageMagick 6.7.2-7 2015-02-27 Q16 http://www.imagemagick.org
OS: RHEL 6 x86_64