Page 1 of 1

Keeping tranparency when working from clipboard

Posted: 2009-09-03T20:52:23-07:00
by lenourien
Hello,
I am working with Imagemagick from powerpoint.
The problem I have is that I select a shape, say a disc for example nothing special. It has a transparent background.
I copy the shape and then ask ImageMagick to create a shadow using "clipboard:" as the source.
The problem is Imagemagick doesn't "see" the transparency and gives me a square shadow everytime.

By the way, I am having Imagemagick giving only the shadow back, so I don't do anything like flattening.
Also, if I export the shape as a png and work from there my code works perfectly, but from the clipboard, it works but no transparency.

I try to use api function to control the format in the clipboard but I am going nowhere. if anybody has any idea???

Any help would be much appreciated. Many thanks in advance.

Re: Keeping tranparency when working from clipboard

Posted: 2009-09-03T21:07:08-07:00
by fmw42
pardon my ignorance, but how do you tell command line IM to use the clipboard as input?

can you modify the read of the clipboard by telling it -channel rgba -alpha on to get the transparency?

Re: Keeping tranparency when working from clipboard

Posted: 2009-09-03T23:16:56-07:00
by lenourien
Hello. To use the clipboard, as the source for my "convert" command, instead of myimage.png (an example) I use "clipboard:".
I found it in the Imagemagick doc.

As for your suggestion, thank you very much. I will try.

Re: Keeping tranparency when working from clipboard

Posted: 2009-09-04T00:01:50-07:00
by lenourien
hello again,
i tried your suggestion -channel rgba -alpha and it didn't work. Obviously Imagemagick sees the image in the clipboard as opaque.

Re: Keeping tranparency when working from clipboard

Posted: 2009-09-04T10:00:18-07:00
by fmw42
so the clipboard is only for Windows?

did you put -channel rgba -alpha before clipboard: or after?

Re: Keeping tranparency when working from clipboard

Posted: 2009-09-04T18:17:31-07:00
by lenourien
Sorry I don't know much about systems others than windows but I assume "clipboard:" refers to whatever memory is used when you copy something.

I put -channel rgba -alpha after "clipboard:" as I assumed we should always start with the source. But maybe I was wrong. I'll try and see what happens.