assert(cache_info->signature == MagickSignature);
method=cache_info->virtual_pixel_method;
cache_info->virtual_pixel_method=virtual_pixel_method;
- switch (virtual_pixel_method)
- {
- case BackgroundVirtualPixelMethod:
- {
- if ((image->background_color.matte != MagickFalse) &&
- (image->matte == MagickFalse))
- (void) SetCacheAlphaChannel(image,OpaqueAlpha,exception);
- break;
- }
- case TransparentVirtualPixelMethod:
+ if ((image->columns != 0) && (image->rows != 0))
+ switch (virtual_pixel_method)
{
- if (image->matte == MagickFalse)
- (void) SetCacheAlphaChannel(image,OpaqueAlpha,exception);
- break;
+ case BackgroundVirtualPixelMethod:
+ {
+ if ((image->background_color.matte != MagickFalse) &&
+ (image->matte == MagickFalse))
+ (void) SetCacheAlphaChannel(image,OpaqueAlpha,exception);
+ break;
+ }
+ case TransparentVirtualPixelMethod:
+ {
+ if (image->matte == MagickFalse)
+ (void) SetCacheAlphaChannel(image,OpaqueAlpha,exception);
+ break;
+ }
+ default:
+ break;
}
- default:
- break;
- }
return(method);
}
\f
image->client_data=image_info->client_data;
if (image_info->cache != (void *) NULL)
ClonePixelCacheMethods(image->cache,image_info->cache);
+ (void) SetImageVirtualPixelMethod(image,image_info->virtual_pixel_method,
+ exception);
(void) SyncImageSettings(image_info,image,exception);
option=GetImageOption(image_info,"delay");
if (option != (const char *) NULL)