Change opacity for photoshop generated png

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
mortgage
Posts: 3
Joined: 2015-06-16T09:12:56-07:00
Authentication code: 6789

Change opacity for photoshop generated png

Post by mortgage »

I'm trying to compose two images after changing opacity for one of them (created by Photoshop CS 5.5). But result is strange.
My file has transparent background. I saved it as 'png-24'.
Note appeared white background.
Please, help — what am I doing wrong?

Code: Select all

convert logo: \( water3.png -alpha on -channel A -evaluate set 75% +channel \) -composite results.jpg
Image
Image
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Change opacity for photoshop generated png

Post by snibgo »

Water3.png has opaque blue, transparent blue and transparent white. You set all the pixels to 75% opacity. So this gives 75% opaque blue and white. Perhaps you would prefer to multiply opacity by 0.75.
snibgo's IM pages: im.snibgo.com
mortgage
Posts: 3
Joined: 2015-06-16T09:12:56-07:00
Authentication code: 6789

Re: Change opacity for photoshop generated png

Post by mortgage »

I guess '-evaluate set 75%' is applying only to alpha channel because of '-channel A'. Why not?
How can I 'multiply opacity by 0.75'? Something like this?

Code: Select all

-channel A -evaluate multiply 0.75 +channel
Is it equivalent for 'normal' blend mode of Photoshop? I need such mode.
Post Reply