Code: Select all
geometry.x=(-geometry.x);
geometry.y=(-geometry.y);
Code: Select all
case 93: /* Extent */
{
if (attribute_flag[7] != 0)
image->gravity=(GravityType) argument_list[7].integer_reference;
if (attribute_flag[0] != 0)
{
int
flags;
flags=ParseGravityGeometry(image,
argument_list[0].string_reference,&geometry,exception);
if (geometry.width == 0)
geometry.width=image->columns;
if (geometry.height == 0)
geometry.height=image->rows;
geometry.x=(-geometry.x);
geometry.y=(-geometry.y);
}
if (attribute_flag[1] != 0)
geometry.width=argument_list[1].integer_reference;
if (attribute_flag[2] != 0)
geometry.height=argument_list[2].integer_reference;
if (attribute_flag[3] != 0)
geometry.x=argument_list[3].integer_reference;
if (attribute_flag[4] != 0)
geometry.y=argument_list[4].integer_reference;
if (attribute_flag[5] != 0)
image->fuzz=SiPrefixToDouble(argument_list[5].string_reference,
QuantumRange);
if (attribute_flag[6] != 0)
(void) QueryColorDatabase(argument_list[6].string_reference,
&image->background_color,exception);
image=ExtentImage(image,&geometry,exception);
break;
Code: Select all
$subImage->Extent(width => 2*$r+1, height => 2*$r+1, x => $x0-$r, y => $y0-$r);
Code: Select all
$subImage->Extent(width => 2*$r+1, height => 2*$r+1, x => -($x0-$r), y => -($y0-$r));
Code: Select all
my $extGeom = sprintf("%dx%d+%d+%d", 2*$r+1, 2*$r+1, $x0-$r, $y0-$r);
$subImage->Extent(geometry => $extGeom);
Rick