artifact=GetImageArtifact(image,"gradient:bounding-box");
if (artifact != (const char *) NULL)
(void) ParseAbsoluteGeometry(artifact,&gradient->bounding_box);
- gradient->gradient_vector.x2=(double) image->columns-1.0;
- gradient->gradient_vector.y2=(double) image->rows-1.0;
+ gradient->gradient_vector.x2=(double) image->columns;
+ gradient->gradient_vector.y2=(double) image->rows;
artifact=GetImageArtifact(image,"gradient:direction");
if (artifact != (const char *) NULL)
{
{
case NorthWestGravity:
{
- gradient->gradient_vector.x1=(double) image->columns-1.0;
- gradient->gradient_vector.y1=(double) image->rows-1.0;
+ gradient->gradient_vector.x1=(double) image->columns;
+ gradient->gradient_vector.y1=(double) image->rows;
gradient->gradient_vector.x2=0.0;
gradient->gradient_vector.y2=0.0;
break;
case NorthGravity:
{
gradient->gradient_vector.x1=0.0;
- gradient->gradient_vector.y1=(double) image->rows-1.0;
+ gradient->gradient_vector.y1=(double) image->rows;
gradient->gradient_vector.x2=0.0;
gradient->gradient_vector.y2=0.0;
break;
case NorthEastGravity:
{
gradient->gradient_vector.x1=0.0;
- gradient->gradient_vector.y1=(double) image->rows-1.0;
- gradient->gradient_vector.x2=(double) image->columns-1.0;
+ gradient->gradient_vector.y1=(double) image->rows;
+ gradient->gradient_vector.x2=(double) image->columns;
gradient->gradient_vector.y2=0.0;
break;
}
case WestGravity:
{
- gradient->gradient_vector.x1=(double) image->columns-1.0;
+ gradient->gradient_vector.x1=(double) image->columns;
gradient->gradient_vector.y1=0.0;
gradient->gradient_vector.x2=0.0;
gradient->gradient_vector.y2=0.0;
{
gradient->gradient_vector.x1=0.0;
gradient->gradient_vector.y1=0.0;
- gradient->gradient_vector.x2=(double) image->columns-1.0;
+ gradient->gradient_vector.x2=(double) image->columns;
gradient->gradient_vector.y2=0.0;
break;
}
case SouthWestGravity:
{
- gradient->gradient_vector.x1=(double) image->columns-1.0;
+ gradient->gradient_vector.x1=(double) image->columns;
gradient->gradient_vector.y1=0.0;
gradient->gradient_vector.x2=0.0;
- gradient->gradient_vector.y2=(double) image->rows-1.0;
+ gradient->gradient_vector.y2=(double) image->rows;
break;
}
case SouthGravity:
gradient->gradient_vector.x1=0.0;
gradient->gradient_vector.y1=0.0;
gradient->gradient_vector.x2=0.0;
- gradient->gradient_vector.y2=(double) image->columns-1.0;
+ gradient->gradient_vector.y2=(double) image->columns;
break;
}
case SouthEastGravity:
{
gradient->gradient_vector.x1=0.0;
gradient->gradient_vector.y1=0.0;
- gradient->gradient_vector.x2=(double) image->columns-1.0;
- gradient->gradient_vector.y2=(double) image->rows-1.0;
+ gradient->gradient_vector.x2=(double) image->columns;
+ gradient->gradient_vector.y2=(double) image->rows;
break;
}
default: