Hi,

I have a script that overlays rounded corners on any image.
Problem is - it's broken in 6.2.9.x (actually it's broken since 6.2.5
!).

I've a feeling this is related to an earlier bug I reported with
gradients and masks (which has been fixed in 6.2.9-8).

Here is some sample code that creates a cut-out mask of a circle . 
The mask is created OK (mask.png) but it's completely ignored when
compositing (see corners.png - this should have an empty inner circle
but instead it's all blue).

#!/usr/bin/perl
use strict;
use Image::Magick;
my $radius = 100;
my $color = "#0000ff";
my $mask = Image::Magick->new;
$mask->Set(size=>sprintf("%dx%d",($radius*2)+1,($radius*2)+1));
$mask->ReadImage("xc:#FFFFFF");
$mask->Draw(primitive=>"ellipse",         
 points=>sprintf("%d,%d %d,%d 0,360",$radius,$radius,$radius,$radius),  
 method=>"Floodfill",                     
 fill=>"#000000",                                 
 stroke=>"none");

my $corners = $mask->Clone;
# im 6.0.7 doesn't do corners correctly
# the mask doesn't seem to work !
$corners->Colorize(fill=>$color);
$corners->Composite(image=>$corners, mask=>$mask);
$mask->Write(filename=>"mask.png");
$corners->Write(filename=>"corners.png");



__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
_______________________________________________
Magick-users mailing list
[email protected]
http://studio.imagemagick.org/mailman/listinfo/magick-users

Reply via email to