From: cristy Date: Fri, 21 Oct 2011 19:08:58 +0000 (+0000) Subject: (no commit message) X-Git-Tag: 7.0.1-0~6764 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=33e9da6ee222c000535f02c299c1ae7cbee529bd;p=imagemagick --- diff --git a/MagickCore/cache.c b/MagickCore/cache.c index 0b8e0b612..8da3c3c36 100644 --- a/MagickCore/cache.c +++ b/MagickCore/cache.c @@ -2304,90 +2304,6 @@ MagickExport MagickBooleanType GetOneVirtualMagickPixel(const Image *image, % % % % % % -% G e t O n e V i r t u a l M e t h o d P i x e l % -% % -% % -% % -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% -% GetOneVirtualMethodPixel() returns a single pixel at the specified (x,y) -% location as defined by specified pixel method. The image background color -% is returned if an error occurs. If you plan to modify the pixel, use -% GetOneAuthenticPixel() instead. -% -% The format of the GetOneVirtualMethodPixel() method is: -% -% MagickBooleanType GetOneVirtualMethodPixel(const Image image, -% const VirtualPixelMethod virtual_pixel_method,const ssize_t x, -% const ssize_t y,Quantum *pixel,ExceptionInfo exception) -% -% A description of each parameter follows: -% -% o image: the image. -% -% o virtual_pixel_method: the virtual pixel method. -% -% o x,y: These values define the location of the pixel to return. -% -% o pixel: return a pixel at the specified (x,y) location. -% -% o exception: return any errors or warnings in this structure. -% -*/ -MagickExport MagickBooleanType GetOneVirtualMethodPixel(const Image *image, - const VirtualPixelMethod virtual_pixel_method,const ssize_t x,const ssize_t y, - Quantum *pixel,ExceptionInfo *exception) -{ - CacheInfo - *cache_info; - - const int - id = GetOpenMPThreadId(); - - const Quantum - *p; - - register ssize_t - i; - - assert(image != (const Image *) NULL); - assert(image->signature == MagickSignature); - assert(image->cache != (Cache) NULL); - cache_info=(CacheInfo *) image->cache; - assert(cache_info->signature == MagickSignature); - (void) memset(pixel,0,MaxPixelChannels*sizeof(*pixel)); - if (cache_info->methods.get_one_virtual_pixel_from_handler != - (GetOneVirtualPixelFromHandler) NULL) - return(cache_info->methods.get_one_virtual_pixel_from_handler(image, - virtual_pixel_method,x,y,pixel,exception)); - assert(id < (int) cache_info->number_threads); - p=GetVirtualPixelsFromNexus(image,virtual_pixel_method,x,y,1UL,1UL, - cache_info->nexus_info[id],exception); - if (p == (const Quantum *) NULL) - { - pixel[RedPixelChannel]=image->background_color.red; - pixel[GreenPixelChannel]=image->background_color.green; - pixel[BluePixelChannel]=image->background_color.blue; - pixel[BlackPixelChannel]=image->background_color.black; - pixel[AlphaPixelChannel]=image->background_color.alpha; - return(MagickFalse); - } - for (i=0; i < (ssize_t) GetPixelChannels(image); i++) - { - PixelChannel - channel; - - channel=GetPixelChannelMapChannel(image,(PixelChannel) i); - pixel[channel]=p[i]; - } - return(MagickTrue); -} - -/* -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% % -% % -% % % G e t O n e V i r t u a l P i x e l % % % % % diff --git a/MagickCore/cache.h b/MagickCore/cache.h index f83e15ff9..6902644f5 100644 --- a/MagickCore/cache.h +++ b/MagickCore/cache.h @@ -37,8 +37,6 @@ extern MagickExport MagickBooleanType const ssize_t,const ssize_t,PixelInfo *,ExceptionInfo *), GetOneVirtualPixel(const Image *,const ssize_t,const ssize_t,Quantum *, ExceptionInfo *), - GetOneVirtualMethodPixel(const Image *,const VirtualPixelMethod,const ssize_t, - const ssize_t,Quantum *,ExceptionInfo *), GetOneAuthenticPixel(Image *,const ssize_t,const ssize_t,Quantum *, ExceptionInfo *), PersistPixelCache(Image *,const char *,const MagickBooleanType, diff --git a/coders/msl.c b/coders/msl.c index 2c10ce162..c5baf698e 100644 --- a/coders/msl.c +++ b/coders/msl.c @@ -1698,7 +1698,8 @@ static void MSLStartElement(void *context,const xmlChar *tag, if ((flags & HeightValue) == 0) geometry.height=geometry.width; (void) GetOneVirtualMagickPixel(msl_info->image[n], - geometry.x,geometry.y,&target,&exception); + TileVirtualPixelMethod,geometry.x,geometry.y,&target, + &exception); break; } ThrowMSLException(OptionError,"UnrecognizedAttribute", @@ -1712,7 +1713,8 @@ static void MSLStartElement(void *context,const xmlChar *tag, { geometry.x=StringToLong(value); (void) GetOneVirtualMagickPixel(msl_info->image[n], - geometry.x,geometry.y,&target,&exception); + TileVirtualPixelMethod,geometry.x,geometry.y,&target, + &exception); break; } ThrowMSLException(OptionError,"UnrecognizedAttribute", @@ -1726,7 +1728,8 @@ static void MSLStartElement(void *context,const xmlChar *tag, { geometry.y=StringToLong(value); (void) GetOneVirtualMagickPixel(msl_info->image[n], - geometry.x,geometry.y,&target,&exception); + TileVirtualPixelMethod,geometry.x,geometry.y,&target, + &exception); break; } ThrowMSLException(OptionError,"UnrecognizedAttribute", @@ -3730,7 +3733,8 @@ static void MSLStartElement(void *context,const xmlChar *tag, if ((flags & HeightValue) == 0) geometry.height=geometry.width; (void) GetOneVirtualMagickPixel(msl_info->image[n], - geometry.x,geometry.y,&target,&exception); + TileVirtualPixelMethod,geometry.x,geometry.y,&target, + &exception); break; } ThrowMSLException(OptionError,"UnrecognizedAttribute", @@ -3756,7 +3760,8 @@ static void MSLStartElement(void *context,const xmlChar *tag, { geometry.x=StringToLong(value); (void) GetOneVirtualMagickPixel(msl_info->image[n], - geometry.x,geometry.y,&target,&exception); + TileVirtualPixelMethod,geometry.x,geometry.y,&target, + &exception); break; } ThrowMSLException(OptionError,"UnrecognizedAttribute", @@ -3770,7 +3775,8 @@ static void MSLStartElement(void *context,const xmlChar *tag, { geometry.y=StringToLong(value); (void) GetOneVirtualMagickPixel(msl_info->image[n], - geometry.x,geometry.y,&target,&exception); + TileVirtualPixelMethod,geometry.x,geometry.y,&target, + &exception); break; } ThrowMSLException(OptionError,"UnrecognizedAttribute", diff --git a/coders/svg.c b/coders/svg.c index ddaaca4ed..17adda704 100644 --- a/coders/svg.c +++ b/coders/svg.c @@ -2910,6 +2910,7 @@ static Image *ReadSVGImage(const ImageInfo *image_info,ExceptionInfo *exception) #else p=gdk_pixbuf_get_pixels(pixel_info); #endif + GetPixelInfo(image,&fill_color); for (y=0; y < (ssize_t) image->rows; y++) { q=GetAuthenticPixels(image,0,y,image->columns,1,exception);