units=(ResolutionType) ParseCommandOption(MagickResolutionOptions,
MagickFalse,option);
if (units != UndefinedResolution)
- {
- if (image->units != units)
- switch (image->units)
- {
- case PixelsPerInchResolution:
- {
- if (units == PixelsPerCentimeterResolution)
- {
- image->resolution.x/=2.54;
- image->resolution.y/=2.54;
- }
- break;
- }
- case PixelsPerCentimeterResolution:
- {
- if (units == PixelsPerInchResolution)
- {
- image->resolution.x=(double) ((size_t) (100.0*2.54*
- image->resolution.x+0.5))/100.0;
- image->resolution.y=(double) ((size_t) (100.0*2.54*
- image->resolution.y+0.5))/100.0;
- }
- break;
- }
- default:
- break;
- }
- image->units=units;
- }
+ image->units=units;
option=GetImageOption(image_info,"virtual-pixel");
if (option != (const char *) NULL)
(void) SetImageVirtualPixelMethod(image,(VirtualPixelMethod)