]> granicus.if.org Git - imagemagick/commitdiff
(no commit message)
authorcristy <urban-warrior@git.imagemagick.org>
Fri, 1 Aug 2014 16:24:14 +0000 (16:24 +0000)
committercristy <urban-warrior@git.imagemagick.org>
Fri, 1 Aug 2014 16:24:14 +0000 (16:24 +0000)
coders/gradient.c

index 7dfe4cb598091b57a88ee4a9b976831308e66aef..8773d9071c5daaf5c35eb6e3e04b3247ed6a89d1 100644 (file)
@@ -124,16 +124,16 @@ static Image *ReadGRADIENTImage(const ImageInfo *image_info,
   assert(exception->signature == MagickSignature);
   read_info=CloneImageInfo(image_info);
   SetImageInfoBlob(read_info,(void *) NULL,0);
+  (void) CopyMagickString(colorname,image_info->filename,MaxTextExtent);
+  (void) sscanf(image_info->filename,"%[^-]",colorname);
   (void) FormatLocaleString(read_info->filename,MaxTextExtent,"xc:%s",
-    image_info->filename);
+    colorname);
   image=ReadImage(read_info,exception);
   read_info=DestroyImageInfo(read_info);
   if (image == (Image *) NULL)
     return((Image *) NULL);
   (void) SetImageAlpha(image,(Quantum) TransparentAlpha,exception);
   (void) CopyMagickString(image->filename,image_info->filename,MaxTextExtent);
-  (void) CopyMagickString(colorname,image_info->filename,MaxTextExtent);
-  (void) sscanf(image_info->filename,"%[^-]",colorname);
   icc_color=MagickFalse;
   if (LocaleCompare(colorname,"icc") == 0)
     {