Transparency

Magick++ is an object-oriented C++ interface to ImageMagick. Use this forum to discuss, make suggestions about, or report bugs concerning Magick++.
Post Reply
martinKing71
Posts: 3
Joined: 2011-10-12T09:19:35-07:00
Authentication code: 8675308

Transparency

Post by martinKing71 »

Hi,

A nice quick one.

In Photoshop you can set the opacity for a layer. Is this value retrievable from IM++?
I've found the opacity method to attenuate the opacity channel, but nothing for retrieving the opacity for the layer.

Cheers


Martin
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Transparency

Post by anthony »

Do you mean a switch to 'disable' a specific layer image?

No something like that is not in IM, but you can simply delete a image. If you need that image again you can save images in the "MPR:" (memory image register). That is a little like storing images (or image sequences) in a 'named' location in memory for later use.

http://www.imagemagick.org/Usage/files/#mpr
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
martinKing71
Posts: 3
Joined: 2011-10-12T09:19:35-07:00
Authentication code: 8675308

Re: Transparency

Post by martinKing71 »

Cheers for the reply, but I'm definitely after the opacity value for a layer.

It's the value that multiplies the RGBA pixel data for a layer, which is found on the blending mode for the layer, and is set to 100% by default if that makes it any clearer.
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Transparency

Post by anthony »

I see. No Im does not currently have any 'per image transparency multiplier', whcih can be applied to individual image layers.

You can however actually multiply all the alpha values of a layer, using something like
-channel A -evaluate multiply 50% +channel
But there is no 'meta-data' multiplier. At least not at this time.

It may be possible to implement this as a per-image setting, but it would probably be limited to specific operations, such as the -layer methods flatten, mosaic, merge, and ignored by other operations.

This may be especially the case for IMv7 where I am currently reviewing how the various properities, artifacts, and global options (internal names) are being handled. For example I am looking at allowing a more per-image -compose setting for the layering methods in IMv7.

I have added this to my to-do list, but no ETA.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply