Page 1 of 1

alpha image with tranparent background

Posted: 2011-07-18T22:09:36-07:00
by prateek2k10
when we composite any image having transparent background with alpha set then background of the image getting black in the latest version 6.7.1. plz help me its urgent

Re: alpha image with tranparent background

Posted: 2011-07-18T22:12:36-07:00
by anthony
Command? Image file format? Example image?

Not all image file formats understand transparency. JPEG being the most common no-transparent image file format.

Re: alpha image with tranparent background

Posted: 2011-07-18T22:20:01-07:00
by prateek2k10
command we using
exec('composite -blend '.$percentage.' "'.$input.'" -size "'.$width.'"x"'.$height.'" xc:transparent -alpha Set png:"'.$convertpath.'"');

image file format - png, jpg

we were using these components.

Re: alpha image with tranparent background

Posted: 2011-07-18T22:25:14-07:00
by anthony
That works fine for me in my tests. the -alpha set is not needed, as the background image is 'transparent' already.

Re: alpha image with tranparent background

Posted: 2011-07-18T22:34:05-07:00
by prateek2k10
thanks for your support but i m again getting the "Black" background plz check your version bec's in previous version output was fine but in latest version the output is in black background

Re: alpha image with tranparent background

Posted: 2011-07-18T22:39:39-07:00
by anthony
Can you expand the variables in the command?

Re: alpha image with tranparent background

Posted: 2011-07-18T22:41:49-07:00
by anthony
Also what relation is the 'size' argument to your input image? The same size.
If so it looks like you are only trying to add 50% transparency. Try this...

Code: Select all

   convert input_image.png -alpha set -channel A -evaluate multiply 0.5 +channel output_image.png

Re: alpha image with tranparent background

Posted: 2011-07-18T22:45:08-07:00
by prateek2k10
exec('composite -blend "20" "textLabel.png" -size "200X200" xc:transparent -alpha Set png:"rose.png"');

that is we use, and if we use white or some other color in place of "transparent" it works but transparent and either "none" is not working.

Re: alpha image with tranparent background

Posted: 2011-07-19T00:19:11-07:00
by prateek2k10
i was made all the efforts but its not working and your code is also not working could you plz tell me how to change the version of imagemagick on linux server and what is the role of the RPM file in installation

Re: alpha image with tranparent background

Posted: 2011-07-19T00:21:23-07:00
by anthony
Very strange as it is working for us.

A "Display" of the resulting image shows a very faint image of my input image on a checkerboard underlay.

Re: alpha image with tranparent background

Posted: 2011-07-19T00:23:13-07:00
by anthony
prateek2k10 wrote:i was made all the efforts but its not working and your code is also not working could you plz tell me how to change the version of imagemagick on linux server and what is the role of the RPM file in installation
The RPM file is just a pre-compiled package, that is installed so that it can be removed or updated (patched) as need by the system. Basically t tracks what files are installed, and if someone modifies its default configuration (so it can preserve it)

Re: alpha image with tranparent background

Posted: 2011-07-19T01:09:47-07:00
by prateek2k10
ok do one thing with your output(image) open it in the Photoshop if it is fine then plz send me image. if possible

Re: alpha image with tranparent background

Posted: 2011-07-19T17:12:44-07:00
by anthony
First I am not a windows user. Linux only. So no photoshop.
second you never gave a link to your source image. So I used a PNG created using
convert rose: input.png