Page 1 of 1

Composite produces unexpected "border"

Posted: 2012-11-11T13:31:59-07:00
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?