flags=ParseGeometry(SvPV(sval,na),&geometry_info);
for ( ; image; image=image->next)
{
- image->delay=(unsigned long) (geometry_info.rho+0.5);
+ image->delay=(unsigned long) floor(geometry_info.rho+0.5);
if ((flags & SigmaValue) != 0)
- image->ticks_per_second=(unsigned long) (geometry_info.sigma+0.5);
+ image->ticks_per_second=(unsigned long)
+ floor(geometry_info.sigma+0.5);
}
break;
}
if (attribute_flag[4] != 0)
geometry_info.psi=argument_list[4].long_reference;
image=ShadowImage(image,geometry_info.rho,geometry_info.sigma,
- (long) (geometry_info.xi+0.5),(long) (geometry_info.psi+0.5),
- exception);
+ (long) ceil(geometry_info.xi-0.5),(long) ceil(geometry_info.psi-
+ 0.5),exception);
break;
}
case 90: /* Identify */
(void) QueryColorDatabase(argument_list[5].string_reference,
&image->background_color,exception);
image=VignetteImage(image,geometry_info.rho,geometry_info.sigma,
- (long) (geometry_info.xi+0.5),(long) (geometry_info.psi+0.5),
- exception);
+ (long) ceil(geometry_info.xi-0.5),(long) ceil(geometry_info.psi-
+ 0.5),exception);
break;
}
case 95: /* ContrastStretch */
PUSHs(&sv_undef);
continue;
}
- PUSHs(sv_2mortal(newSViv((unsigned long) (color.red+0.5))));
- PUSHs(sv_2mortal(newSViv((unsigned long) (color.green+0.5))));
- PUSHs(sv_2mortal(newSViv((unsigned long) (color.blue+0.5))));
+ PUSHs(sv_2mortal(newSViv((unsigned long) floor(color.red+0.5))));
+ PUSHs(sv_2mortal(newSViv((unsigned long) floor(color.green+0.5))));
+ PUSHs(sv_2mortal(newSViv((unsigned long) floor(color.blue+0.5))));
if (color.matte != MagickFalse)
- PUSHs(sv_2mortal(newSViv((unsigned long) (color.opacity+0.5))));
+ PUSHs(sv_2mortal(newSViv((unsigned long) floor(color.opacity+0.5))));
if (color.colorspace == CMYKColorspace)
- PUSHs(sv_2mortal(newSViv((unsigned long) (color.index+0.5))));
+ PUSHs(sv_2mortal(newSViv((unsigned long) floor(color.index+0.5))));
}
PerlException:
jpeg_info.density_unit=(UINT8) 1;
if (image->debug != MagickFalse)
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
- "Image resolution: %ld,%ld",(long) ceil(image->x_resolution-0.5),
- (long) ceil(image->y_resolution-0.5));
+ "Image resolution: %ld,%ld",(long) floor(image->x_resolution+0.5),
+ (long) floor(image->y_resolution+0.5));
if ((image->x_resolution != 0.0) && (image->y_resolution != 0.0))
{
/*
}
}
shadow_image=ShadowImage(msl_info->image[n],geometry_info.rho,
- geometry_info.sigma,(long) floor(geometry_info.xi+0.5),(long)
- floor(geometry_info.psi+0.5),&msl_info->image[n]->exception);
+ geometry_info.sigma,(long) ceil(geometry_info.xi-0.5),(long)
+ ceil(geometry_info.psi-0.5),&msl_info->image[n]->exception);
if (shadow_image == (Image *) NULL)
break;
msl_info->image[n]=DestroyImage(msl_info->image[n]);
if ((flags & PsiValue) == 0)
geometry_info.psi=4.0;
shadow_image=ShadowImage(*image,geometry_info.rho,
- geometry_info.sigma,(long) floor(geometry_info.xi+0.5),(long)
- floor(geometry_info.psi+0.5),exception);
+ geometry_info.sigma,(long) ceil(geometry_info.xi-0.5),(long)
+ ceil(geometry_info.psi-0.5),exception);
if (shadow_image == (Image *) NULL)
break;
*image=DestroyImage(*image);
if ((flags & PsiValue) == 0)
geometry_info.psi=0.1*(*image)->rows;
vignette_image=VignetteImage(*image,geometry_info.rho,
- geometry_info.sigma,(long) floor(geometry_info.xi+0.5),(long)
- floor(geometry_info.psi+0.5),exception);
+ geometry_info.sigma,(long) ceil(geometry_info.xi-0.5),(long)
+ ceil(geometry_info.psi-0.5),exception);
if (vignette_image == (Image *) NULL)
break;
*image=DestroyImage(*image);