Composite produces unexpected "border"

PerlMagick is an object-oriented Perl interface to ImageMagick. Use this forum to discuss, make suggestions about, or report bugs concerning PerlMagick.
Post Reply
dnl
Posts: 1
Joined: 2012-11-11T11:58:26-07:00
Authentication code: 67789

Composite produces unexpected "border"

Post by dnl »

[This is my first post here, please let me know my post has issues... TIA]

I'm having a problem with compositing. I have a logo that I want to overlay onto a background. Both are TIFF files. When I do the following, I get a 1-pixel white border around the logo image.

Code: Select all

$stat = $chili->Read( $originalfile ); # Read the logo
$stat = $chili->Transparent( color=>"white" );
$stat = $chili->Set( alpha=>"on" );
$stat = $image->Composite(compose=>"Atop",gravity=>$gravity,x=>$x,y=>$y,image=>$chili );
Image
Note, the image actually has three overlapped copies of the logo, hence the three overlapping while boxen...

I worked around this by going into gimp, converting white to the alpha channel, and saving that image. This produces the image I want:

Code: Select all

$stat = $chili->Read( $modifiedfile ); # Read the logo
$stat = $image->Composite(compose=>"Atop",gravity=>$gravity,x=>$x,y=>$y,image=>$chili );
Image

I'd really rather use the unmodified image so I can keep all the processing in my perl program. But, my expectations are not aligned with reality, so, who's got the cluebat?
Post Reply