]> granicus.if.org Git - imagemagick/commitdiff
(no commit message)
authorcristy <urban-warrior@git.imagemagick.org>
Fri, 21 Oct 2011 19:08:58 +0000 (19:08 +0000)
committercristy <urban-warrior@git.imagemagick.org>
Fri, 21 Oct 2011 19:08:58 +0000 (19:08 +0000)
MagickCore/cache.c
MagickCore/cache.h
coders/msl.c
coders/svg.c

index 0b8e0b6125979393ecaf6471aea764151ada1003..8da3c3c36ffc0a8c4f3d2da1be2796925303b57b 100644 (file)
@@ -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);
-}
-\f
-/*
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%                                                                             %
-%                                                                             %
-%                                                                             %
 %   G e t O n e V i r t u a l P i x e l                                       %
 %                                                                             %
 %                                                                             %
index f83e15ff9a66dfd22725cca3b084738b591cbde1..6902644f50d3a76310af22f3acc0e563bf8c15ac 100644 (file)
@@ -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,
index 2c10ce16230d48c4753dbbd5551c4ca70059e604..c5baf698e84e6833ae86576ec49b9bb5410419a3 100644 (file)
@@ -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",
index ddaaca4edaa37b8c3e3ef272fd314ce5c7298ef3..17adda704200046f094d496a3e004dccd6b45976 100644 (file)
@@ -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);