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 );

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 );

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?