]> granicus.if.org Git - imagemagick/commitdiff
(no commit message)
authorcristy <urban-warrior@git.imagemagick.org>
Tue, 10 Sep 2013 16:38:52 +0000 (16:38 +0000)
committercristy <urban-warrior@git.imagemagick.org>
Tue, 10 Sep 2013 16:38:52 +0000 (16:38 +0000)
MagickCore/color.c

index 9ff0bc0d107640e49137ebc94fa920914ba99d47..85131d465a475a47251e7aa8ab2a56f374aa31e6 100644 (file)
@@ -1063,7 +1063,7 @@ MagickExport void ConcatenateColorComponent(const PixelInfo *pixel,
   }
   if (compliance == NoCompliance)
     {
-      (void) FormatLocaleString(text,MaxTextExtent,"%g",color);
+      (void) FormatLocaleString(text,MaxTextExtent,"%.20g",color);
       (void) ConcatenateMagickString(tuple,text,MaxTextExtent);
       return;
     }
@@ -1090,7 +1090,7 @@ MagickExport void ConcatenateColorComponent(const PixelInfo *pixel,
     }
   if (component == AlphaPixelChannel)
     {
-      (void) FormatLocaleString(text,MaxTextExtent,"%g",(double)
+      (void) FormatLocaleString(text,MaxTextExtent,"%.20g",
         (QuantumScale*color));
       (void) ConcatenateMagickString(tuple,text,MaxTextExtent);
       return;
@@ -1103,14 +1103,14 @@ MagickExport void ConcatenateColorComponent(const PixelInfo *pixel,
       (pixel->colorspace == HSVColorspace) ||
       (pixel->colorspace == HWBColorspace))
     {
-      (void) FormatLocaleString(text,MaxTextExtent,"%g%%",(double)
+      (void) FormatLocaleString(text,MaxTextExtent,"%.20g%%",
         (100.0*QuantumScale*color));
       (void) ConcatenateMagickString(tuple,text,MaxTextExtent);
       return;
     }
   if (pixel->depth > 8)
     {
-      (void) FormatLocaleString(text,MaxTextExtent,"%g%%",(double)
+      (void) FormatLocaleString(text,MaxTextExtent,"%.20g%%",
         (100.0*QuantumScale*color));
       (void) ConcatenateMagickString(tuple,text,MaxTextExtent);
       return;