diff --git a/coders/jp2.c b/coders/jp2.c
index 1c33c3a..890e450 100644
--- a/coders/jp2.c
+++ b/coders/jp2.c
@@ -994,7 +994,7 @@
(GetImageQuantumDepth(image,MagickTrue)/8);
target_size=(number_pixels*rate)+header_size;
rate=target_size/number_pixels;
- (void) FormatMagickString(option,MaxTextExtent,"rate=%.15g",rate);
+ (void) FormatMagickString(option,MaxTextExtent,"rate=%g",rate);
(void) ConcatenateString(&options,option);
}
status=jas_image_encode(jp2_image,jp2_stream,format,options) != 0 ?
diff --git a/coders/miff.c b/coders/miff.c
index c7525d9..d58dad2 100644
--- a/coders/miff.c
+++ b/coders/miff.c
@@ -1852,7 +1852,7 @@
if ((image->x_resolution != 0) || (image->y_resolution != 0))
{
(void) FormatMagickString(buffer,MaxTextExtent,
- "resolution=%.15gx%.15g\n",image->x_resolution,image->y_resolution);
+ "resolution=%gx%g\n",image->x_resolution,image->y_resolution);
(void) WriteBlobString(image,buffer);
}
if ((image->page.width != 0) || (image->page.height != 0))
@@ -1935,7 +1935,7 @@
}
if (image->gamma != 0.0)
{
- (void) FormatMagickString(buffer,MaxTextExtent,"gamma=%.15g\n",
+ (void) FormatMagickString(buffer,MaxTextExtent,"gamma=%g\n",
image->gamma);
(void) WriteBlobString(image,buffer);
}
@@ -1944,8 +1944,8 @@
/*
Note chomaticity points.
*/
- (void) FormatMagickString(buffer,MaxTextExtent,"red-primary=%.15g,"
- "%.15g green-primary=%.15g,%.15g blue-primary=%.15g,%.15g\n",
+ (void) FormatMagickString(buffer,MaxTextExtent,"red-primary=%g,"
+ "%g green-primary=%g,%g blue-primary=%g,%g\n",
image->chromaticity.red_primary.x,image->chromaticity.red_primary.y,
image->chromaticity.green_primary.x,
image->chromaticity.green_primary.y,
@@ -1953,7 +1953,7 @@
image->chromaticity.blue_primary.y);
(void) WriteBlobString(image,buffer);
(void) FormatMagickString(buffer,MaxTextExtent,
- "white-point=%.15g,%.15g\n",image->chromaticity.white_point.x,
+ "white-point=%g,%g\n",image->chromaticity.white_point.x,
image->chromaticity.white_point.y);
(void) WriteBlobString(image,buffer);
}
diff --git a/coders/mpc.c b/coders/mpc.c
index 4bf0e8c..4dab01d 100644
--- a/coders/mpc.c
+++ b/coders/mpc.c
@@ -1119,7 +1119,7 @@
if ((image->x_resolution != 0) || (image->y_resolution != 0))
{
(void) FormatMagickString(buffer,MaxTextExtent,
- "resolution=%.15gx%.15g\n",image->x_resolution,image->y_resolution);
+ "resolution=%gx%g\n",image->x_resolution,image->y_resolution);
(void) WriteBlobString(image,buffer);
}
if ((image->page.width != 0) || (image->page.height != 0))
@@ -1203,7 +1203,7 @@
}
if (image->gamma != 0.0)
{
- (void) FormatMagickString(buffer,MaxTextExtent,"gamma=%.15g\n",
+ (void) FormatMagickString(buffer,MaxTextExtent,"gamma=%g\n",
image->gamma);
(void) WriteBlobString(image,buffer);
}
@@ -1213,7 +1213,7 @@
Note chomaticity points.
*/
(void) FormatMagickString(buffer,MaxTextExtent,"red-primary="
- "%.15g,%.15g green-primary=%.15g,%.15g blue-primary=%.15g,%.15g\n",
+ "%g,%g green-primary=%g,%g blue-primary=%g,%g\n",
image->chromaticity.red_primary.x,image->chromaticity.red_primary.y,
image->chromaticity.green_primary.x,
image->chromaticity.green_primary.y,
@@ -1221,7 +1221,7 @@
image->chromaticity.blue_primary.y);
(void) WriteBlobString(image,buffer);
(void) FormatMagickString(buffer,MaxTextExtent,
- "white-point=%.15g,%.15g\n",image->chromaticity.white_point.x,
+ "white-point=%g,%g\n",image->chromaticity.white_point.x,
image->chromaticity.white_point.y);
(void) WriteBlobString(image,buffer);
}
diff --git a/coders/msl.c b/coders/msl.c
index ad5bd67..aa85eac 100644
--- a/coders/msl.c
+++ b/coders/msl.c
@@ -3211,7 +3211,7 @@
}
}
if (*gamma == '\0')
- (void) FormatMagickString(gamma,MaxTextExtent,"%.15g,%.15g,%.15g",
+ (void) FormatMagickString(gamma,MaxTextExtent,"%g,%g,%g",
(double) pixel.red,(double) pixel.green,(double) pixel.blue);
switch (channel)
{
@@ -3962,7 +3962,7 @@
}
}
}
- (void) FormatMagickString(modulate,MaxTextExtent,"%.15g,%.15g,%.15g",
+ (void) FormatMagickString(modulate,MaxTextExtent,"%g,%g,%g",
geometry_info.rho,geometry_info.sigma,geometry_info.xi);
(void) ModulateImage(msl_info->image[n],modulate);
break;
@@ -4810,30 +4810,30 @@
image=msl_info->attributes[n];
FormatImageProperty(image,"msl:font-metrics.pixels_per_em.x",
- "%.15g",metrics.pixels_per_em.x);
+ "%g",metrics.pixels_per_em.x);
FormatImageProperty(image,"msl:font-metrics.pixels_per_em.y",
- "%.15g",metrics.pixels_per_em.y);
- FormatImageProperty(image,"msl:font-metrics.ascent","%.15g",
+ "%g",metrics.pixels_per_em.y);
+ FormatImageProperty(image,"msl:font-metrics.ascent","%g",
metrics.ascent);
- FormatImageProperty(image,"msl:font-metrics.descent","%.15g",
+ FormatImageProperty(image,"msl:font-metrics.descent","%g",
metrics.descent);
- FormatImageProperty(image,"msl:font-metrics.width","%.15g",
+ FormatImageProperty(image,"msl:font-metrics.width","%g",
metrics.width);
- FormatImageProperty(image,"msl:font-metrics.height","%.15g",
+ FormatImageProperty(image,"msl:font-metrics.height","%g",
metrics.height);
- FormatImageProperty(image,"msl:font-metrics.max_advance","%.15g",
+ FormatImageProperty(image,"msl:font-metrics.max_advance","%g",
metrics.max_advance);
- FormatImageProperty(image,"msl:font-metrics.bounds.x1","%.15g",
+ FormatImageProperty(image,"msl:font-metrics.bounds.x1","%g",
metrics.bounds.x1);
- FormatImageProperty(image,"msl:font-metrics.bounds.y1","%.15g",
+ FormatImageProperty(image,"msl:font-metrics.bounds.y1","%g",
metrics.bounds.y1);
- FormatImageProperty(image,"msl:font-metrics.bounds.x2","%.15g",
+ FormatImageProperty(image,"msl:font-metrics.bounds.x2","%g",
metrics.bounds.x2);
- FormatImageProperty(image,"msl:font-metrics.bounds.y2","%.15g",
+ FormatImageProperty(image,"msl:font-metrics.bounds.y2","%g",
metrics.bounds.y2);
- FormatImageProperty(image,"msl:font-metrics.origin.x","%.15g",
+ FormatImageProperty(image,"msl:font-metrics.origin.x","%g",
metrics.origin.x);
- FormatImageProperty(image,"msl:font-metrics.origin.y","%.15g",
+ FormatImageProperty(image,"msl:font-metrics.origin.y","%g",
metrics.origin.y);
}
draw_info=DestroyDrawInfo(draw_info);
diff --git a/coders/pcl.c b/coders/pcl.c
index c8eee7e..31852b5 100644
--- a/coders/pcl.c
+++ b/coders/pcl.c
@@ -321,7 +321,7 @@
(void) ParseAbsoluteGeometry(PSPageGeometry,&page);
if (image_info->page != (char *) NULL)
(void) ParseAbsoluteGeometry(image_info->page,&page);
- (void) FormatMagickString(density,MaxTextExtent,"%.15gx%.15g",
+ (void) FormatMagickString(density,MaxTextExtent,"%gx%g",
image->x_resolution,image->y_resolution);
page.width=(unsigned long) (page.width*image->x_resolution/delta.x+0.5);
page.height=(unsigned long) (page.height*image->y_resolution/delta.y+0.5);
diff --git a/coders/pdf.c b/coders/pdf.c
index c1292e3..7d5ea6c 100644
--- a/coders/pdf.c
+++ b/coders/pdf.c
@@ -525,7 +525,7 @@
Set PDF render geometry.
*/
(void) FormatMagickString(geometry,MaxTextExtent,
- "%.15gx%.15g%+.15g%+.15g",bounds.x2-bounds.x1,bounds.y2-bounds.y1,
+ "%gx%g%+.15g%+.15g",bounds.x2-bounds.x1,bounds.y2-bounds.y1,
bounds.x1,bounds.y1);
(void) SetImageProperty(image,"pdf:HiResBoundingBox",geometry);
page.width=(unsigned long) (bounds.x2-bounds.x1+0.5);
@@ -579,7 +579,7 @@
return((Image *) NULL);
}
*options='\0';
- (void) FormatMagickString(density,MaxTextExtent,"%.15gx%.15g",
+ (void) FormatMagickString(density,MaxTextExtent,"%gx%g",
image->x_resolution,image->y_resolution);
if (image_info->page != (char *) NULL)
{
@@ -1307,11 +1307,11 @@
object+3);
(void) WriteBlobString(image,buffer);
(void) FormatMagickString(buffer,MaxTextExtent,
- "/MediaBox [0 0 %.15g %.15g]\n",72.0*media_info.width/resolution.x,
+ "/MediaBox [0 0 %g %g]\n",72.0*media_info.width/resolution.x,
72.0*media_info.height/resolution.y);
(void) WriteBlobString(image,buffer);
(void) FormatMagickString(buffer,MaxTextExtent,
- "/CropBox [0 0 %.15g %.15g]\n",72.0*media_info.width/resolution.x,
+ "/CropBox [0 0 %g %g]\n",72.0*media_info.width/resolution.x,
72.0*media_info.height/resolution.y);
(void) WriteBlobString(image,buffer);
(void) FormatMagickString(buffer,MaxTextExtent,"/Contents %lu 0 R\n",
@@ -1340,7 +1340,7 @@
for (i=0; labels[i] != (char *) NULL; i++)
{
(void) WriteBlobString(image,"BT\n");
- (void) FormatMagickString(buffer,MaxTextExtent,"/F%lu %.15g Tf\n",
+ (void) FormatMagickString(buffer,MaxTextExtent,"/F%lu %g Tf\n",
image->scene,pointsize);
(void) WriteBlobString(image,buffer);
(void) FormatMagickString(buffer,MaxTextExtent,"%ld %ld Td\n",
@@ -1352,7 +1352,7 @@
labels[i]=DestroyString(labels[i]);
}
(void) FormatMagickString(buffer,MaxTextExtent,
- "%.15g 0 0 %.15g %ld %ld cm\n",scale.x,scale.y,geometry.x,geometry.y);
+ "%g 0 0 %g %ld %ld cm\n",scale.x,scale.y,geometry.x,geometry.y);
(void) WriteBlobString(image,buffer);
(void) FormatMagickString(buffer,MaxTextExtent,"/Im%lu Do\n",image->scene);
(void) WriteBlobString(image,buffer);
diff --git a/coders/ps.c b/coders/ps.c
index c3bd42a..5072269 100644
--- a/coders/ps.c
+++ b/coders/ps.c
@@ -660,7 +660,7 @@
Set Postscript render geometry.
*/
(void) FormatMagickString(geometry,MaxTextExtent,
- "%.15gx%.15g%+.15g%+.15g",bounds.x2-bounds.x1,bounds.y2-bounds.y1,
+ "%gx%g%+.15g%+.15g",bounds.x2-bounds.x1,bounds.y2-bounds.y1,
bounds.x1,bounds.y1);
(void) SetImageProperty(image,"ps:HiResBoundingBox",geometry);
page.width=(unsigned long) (bounds.x2-bounds.x1+0.5);
@@ -687,7 +687,7 @@
"<</UseCIEColor true>>setpagedevice\n",MaxTextExtent);
count=write(file,command,(unsigned int) strlen(command));
(void) FormatMagickString(translate_geometry,MaxTextExtent,
- "%.15g %.15g translate\n",-bounds.x1,-bounds.y1);
+ "%g %g translate\n",-bounds.x1,-bounds.y1);
count=write(file,translate_geometry,strlen(translate_geometry));
file=close(file)-1;
/*
@@ -714,7 +714,7 @@
(void) ParseAbsoluteGeometry(PSPageGeometry,&page);
if (image_info->page != (char *) NULL)
(void) ParseAbsoluteGeometry(image_info->page,&page);
- (void) FormatMagickString(density,MaxTextExtent,"%.15gx%.15g",
+ (void) FormatMagickString(density,MaxTextExtent,"%gx%g",
image->x_resolution,image->y_resolution);
page.width=(unsigned long) (page.width*image->x_resolution/delta.x+0.5);
page.height=(unsigned long) (page.height*image->y_resolution/delta.y+0.5);
@@ -1481,7 +1481,7 @@
(long) (bounds.y2+0.5));
(void) WriteBlobString(image,buffer);
(void) FormatMagickString(buffer,MaxTextExtent,
- "%%%%HiResBoundingBox: %.15g %.15g %.15g %.15g\n",bounds.x1,
+ "%%%%HiResBoundingBox: %g %g %g %g\n",bounds.x1,
bounds.y1,bounds.x2,bounds.y2);
}
(void) WriteBlobString(image,buffer);
@@ -1636,7 +1636,7 @@
(void) WriteBlobString(image," /label 512 string def\n");
(void) WriteBlobString(image," currentfile label readline pop\n");
(void) FormatMagickString(buffer,MaxTextExtent,
- " 0 y %.15g add moveto label show pop\n",j*pointsize+12);
+ " 0 y %g add moveto label show pop\n",j*pointsize+12);
(void) WriteBlobString(image,buffer);
}
for (s=PostscriptEpilog; *s != (char *) NULL; s++)
@@ -1674,7 +1674,7 @@
Output image data.
*/
(void) FormatMagickString(buffer,MaxTextExtent,
- "%ld %ld\n%.15g %.15g\n%.15g\n",geometry.x,geometry.y,scale.x,scale.y,
+ "%ld %ld\n%g %g\n%g\n",geometry.x,geometry.y,scale.x,scale.y,
pointsize);
(void) WriteBlobString(image,buffer);
labels=(char **) NULL;
@@ -2082,7 +2082,7 @@
(long) (bounds.y1+0.5),(long) (bounds.x2+0.5),(long) (bounds.y2+0.5));
(void) WriteBlobString(image,buffer);
(void) FormatMagickString(buffer,MaxTextExtent,
- "%%%%HiResBoundingBox: %.15g %.15g %.15g %.15g\n",bounds.x1,bounds.y1,
+ "%%%%HiResBoundingBox: %g %g %g %g\n",bounds.x1,bounds.y1,
bounds.x2,bounds.y2);
(void) WriteBlobString(image,buffer);
}
diff --git a/coders/ps2.c b/coders/ps2.c
index f8c223e..b373d28 100644
--- a/coders/ps2.c
+++ b/coders/ps2.c
@@ -585,7 +585,7 @@
(long) (bounds.x2+0.5),(long) (bounds.y2+0.5));
(void) WriteBlobString(image,buffer);
(void) FormatMagickString(buffer,MaxTextExtent,
- "%%%%HiResBoundingBox: %.15g %.15g %.15g %.15g\n",bounds.x1,
+ "%%%%HiResBoundingBox: %g %g %g %g\n",bounds.x1,
bounds.y1,bounds.x2,bounds.y2);
}
(void) WriteBlobString(image,buffer);
@@ -658,7 +658,7 @@
(void) WriteBlobString(image," /label 512 string def\n");
(void) WriteBlobString(image," currentfile label readline pop\n");
(void) FormatMagickString(buffer,MaxTextExtent,
- " 0 y %.15g add moveto label show pop\n",j*pointsize+12);
+ " 0 y %g add moveto label show pop\n",j*pointsize+12);
(void) WriteBlobString(image,buffer);
}
for (q=PostscriptEpilog; *q; q++)
@@ -702,7 +702,7 @@
Output image data.
*/
(void) FormatMagickString(buffer,MaxTextExtent,
- "%ld %ld\n%.15g %.15g\n%.15g\n",geometry.x,geometry.y,scale.x,scale.y,
+ "%ld %ld\n%g %g\n%g\n",geometry.x,geometry.y,scale.x,scale.y,
pointsize);
(void) WriteBlobString(image,buffer);
labels=(char **) NULL;
@@ -1097,7 +1097,7 @@
(long) (bounds.y1+0.5),(long) (bounds.x2+0.5),(long) (bounds.y2+0.5));
(void) WriteBlobString(image,buffer);
(void) FormatMagickString(buffer,MaxTextExtent,
- "%%%%HiResBoundingBox: %.15g %.15g %.15g %.15g\n",bounds.x1,bounds.y1,
+ "%%%%HiResBoundingBox: %g %g %g %g\n",bounds.x1,bounds.y1,
bounds.x2,bounds.y2);
(void) WriteBlobString(image,buffer);
}
diff --git a/coders/ps3.c b/coders/ps3.c
index 16b907e..e528233 100644
--- a/coders/ps3.c
+++ b/coders/ps3.c
@@ -1006,11 +1006,11 @@
else
{
(void) FormatMagickString(buffer,MaxTextExtent,
- "%%%%BoundingBox: %.15g %.15g %.15g %.15g\n",floor(bounds.x1+0.5),
+ "%%%%BoundingBox: %g %g %g %g\n",floor(bounds.x1+0.5),
floor(bounds.y1+0.5),ceil(bounds.x2-0.5),ceil(bounds.y2-0.5));
(void) WriteBlobString(image,buffer);
(void) FormatMagickString(buffer,MaxTextExtent,
- "%%%%HiResBoundingBox: %.15g %.15g %.15g %.15g\n",bounds.x1,
+ "%%%%HiResBoundingBox: %g %g %g %g\n",bounds.x1,
bounds.y1,bounds.x2,bounds.y2);
(void) WriteBlobString(image,buffer);
if (image->colorspace == CMYKColorspace)
@@ -1068,7 +1068,7 @@
(void) WriteBlobString(image,
" currentfile buffer readline pop token pop\n");
(void) FormatMagickString(buffer,MaxTextExtent,
- " 0 y %.15g add moveto show pop\n",i*pointsize+12);
+ " 0 y %g add moveto show pop\n",i*pointsize+12);
(void) WriteBlobString(image,buffer);
}
}
@@ -1162,7 +1162,7 @@
Translate, scale, and font point size.
*/
(void) FormatMagickString(buffer,MaxTextExtent,
- "%ld %ld\n%.15g %.15g\n%.15g\n",geometry.x,geometry.y,scale.x,scale.y,
+ "%ld %ld\n%g %g\n%g\n",geometry.x,geometry.y,scale.x,scale.y,
pointsize);
(void) WriteBlobString(image,buffer);
/*
@@ -1578,11 +1578,11 @@
if (page > 1)
{
(void) FormatMagickString(buffer,MaxTextExtent,
- "%%%%BoundingBox: %.15g %.15g %.15g %.15g\n",floor(bounds.x1+0.5),
+ "%%%%BoundingBox: %g %g %g %g\n",floor(bounds.x1+0.5),
floor(bounds.y1+0.5),ceil(bounds.x2-0.5),ceil(bounds.y2-0.5));
(void) WriteBlobString(image,buffer);
(void) FormatMagickString(buffer,MaxTextExtent,
- "%%%%HiResBoundingBox: %.15g %.15g %.15g %.15g\n",bounds.x1,bounds.y1,
+ "%%%%HiResBoundingBox: %g %g %g %g\n",bounds.x1,bounds.y1,
bounds.x2,bounds.y2);
(void) WriteBlobString(image,buffer);
}
diff --git a/coders/svg.c b/coders/svg.c
index e45b54c..a65a526 100644
--- a/coders/svg.c
+++ b/coders/svg.c
@@ -1017,7 +1017,7 @@
if (LocaleCompare((const char *) name,"linearGradient") == 0)
{
MVGPrintf(svg_info->file,
- "push gradient '%s' linear %.15g,%.15g %.15g,%.15g\n",id,
+ "push gradient '%s' linear %g,%g %g,%g\n",id,
svg_info->segment.x1,svg_info->segment.y1,svg_info->segment.x2,
svg_info->segment.y2);
break;
@@ -1035,7 +1035,7 @@
if (LocaleCompare((const char *) name,"pattern") == 0)
{
MVGPrintf(svg_info->file,
- "push pattern '%s' %.15g,%.15g %.15g,%.15g\n",id,
+ "push pattern '%s' %g,%g %g,%g\n",id,
svg_info->bounds.x,svg_info->bounds.y,svg_info->bounds.width,
svg_info->bounds.height);
break;
@@ -1058,7 +1058,7 @@
if (LocaleCompare((const char *) name,"radialGradient") == 0)
{
MVGPrintf(svg_info->file,
- "push gradient '%s' radial %.15g,%.15g %.15g,%.15g %.15g\n",
+ "push gradient '%s' radial %g,%g %g,%g %g\n",
id,svg_info->element.cx,svg_info->element.cy,
svg_info->element.major,svg_info->element.minor,
svg_info->element.angle);
@@ -1103,7 +1103,7 @@
*text;
text=EscapeString(svg_info->text,'\'');
- MVGPrintf(svg_info->file,"text %.15g,%.15g '%s'\n",
+ MVGPrintf(svg_info->file,"text %g,%g '%s'\n",
svg_info->bounds.x-svg_info->center.x,svg_info->bounds.y-
svg_info->center.y,text);
text=DestroyString(text);
@@ -1138,7 +1138,7 @@
{
if (LocaleCompare(keyword,"angle") == 0)
{
- MVGPrintf(svg_info->file,"angle %.15g\n",
+ MVGPrintf(svg_info->file,"angle %g\n",
GetUserSpaceCoordinateValue(svg_info,0,value));
break;
}
@@ -1249,7 +1249,7 @@
if (LocaleCompare(keyword,"font-size") == 0)
{
svg_info->pointsize=GetUserSpaceCoordinateValue(svg_info,0,value);
- MVGPrintf(svg_info->file,"font-size %.15g\n",svg_info->pointsize);
+ MVGPrintf(svg_info->file,"font-size %g\n",svg_info->pointsize);
break;
}
if (LocaleCompare(keyword,"font-weight") == 0)
@@ -1401,7 +1401,7 @@
current.ty;
}
MVGPrintf(svg_info->file,
- "affine %.15g %.15g %.15g %.15g %.15g %.15g\n",transform.sx,
+ "affine %g %g %g %g %g %g\n",transform.sx,
transform.rx,transform.ry,transform.sy,transform.tx,
transform.ty);
for (j=0; tokens[j] != (char *) NULL; j++)
@@ -1497,11 +1497,11 @@
angle;
angle=GetUserSpaceCoordinateValue(svg_info,0,value);
- MVGPrintf(svg_info->file,"translate %.15g,%.15g\n",
+ MVGPrintf(svg_info->file,"translate %g,%g\n",
svg_info->bounds.x,svg_info->bounds.y);
svg_info->bounds.x=0;
svg_info->bounds.y=0;
- MVGPrintf(svg_info->file,"rotate %.15g\n",angle);
+ MVGPrintf(svg_info->file,"rotate %g\n",angle);
break;
}
if (LocaleCompare(keyword,"rx") == 0)
@@ -1582,7 +1582,7 @@
}
if (LocaleCompare(keyword,"stroke-width") == 0)
{
- MVGPrintf(svg_info->file,"stroke-width %.15g\n",
+ MVGPrintf(svg_info->file,"stroke-width %g\n",
GetUserSpaceCoordinateValue(svg_info,1,value));
break;
}
@@ -1674,7 +1674,7 @@
{
svg_info->pointsize=GetUserSpaceCoordinateValue(
svg_info,0,value);
- MVGPrintf(svg_info->file,"font-size %.15g\n",
+ MVGPrintf(svg_info->file,"font-size %g\n",
svg_info->pointsize);
break;
}
@@ -1690,7 +1690,7 @@
{
if (LocaleCompare(keyword,"offset") == 0)
{
- MVGPrintf(svg_info->file,"offset %.15g\n",
+ MVGPrintf(svg_info->file,"offset %g\n",
GetUserSpaceCoordinateValue(svg_info,1,value));
break;
}
@@ -1763,7 +1763,7 @@
}
if (LocaleCompare(keyword,"stroke-width") == 0)
{
- MVGPrintf(svg_info->file,"stroke-width %.15g\n",
+ MVGPrintf(svg_info->file,"stroke-width %g\n",
GetUserSpaceCoordinateValue(svg_info,1,value));
break;
}
@@ -1993,7 +1993,7 @@
current.ty;
}
MVGPrintf(svg_info->file,
- "affine %.15g %.15g %.15g %.15g %.15g %.15g\n",transform.sx,
+ "affine %g %g %g %g %g %g\n",transform.sx,
transform.rx,transform.ry,transform.sy,transform.tx,
transform.ty);
for (j=0; tokens[j] != (char *) NULL; j++)
@@ -2120,7 +2120,7 @@
svg_info->height);
sx=(double) svg_info->width/svg_info->view_box.width;
sy=(double) svg_info->height/svg_info->view_box.height;
- MVGPrintf(svg_info->file,"affine %.15g 0 0 %.15g 0.0 0.0\n",sx,sy);
+ MVGPrintf(svg_info->file,"affine %g 0 0 %g 0.0 0.0\n",sx,sy);
}
}
(void) LogMagickEvent(CoderEvent,GetMagickModule()," )");
@@ -2147,7 +2147,7 @@
{
if (LocaleCompare((const char *) name,"circle") == 0)
{
- MVGPrintf(svg_info->file,"circle %.15g,%.15g %.15g,%.15g\n",
+ MVGPrintf(svg_info->file,"circle %g,%g %g,%g\n",
svg_info->element.cx,svg_info->element.cy,svg_info->element.cx,
svg_info->element.cy+svg_info->element.minor);
MVGPrintf(svg_info->file,"pop graphic-context\n");
@@ -2197,7 +2197,7 @@
angle;
angle=svg_info->element.angle;
- MVGPrintf(svg_info->file,"ellipse %.15g,%.15g %.15g,%.15g 0,360\n",
+ MVGPrintf(svg_info->file,"ellipse %g,%g %g,%g 0,360\n",
svg_info->element.cx,svg_info->element.cy,
angle == 0.0 ? svg_info->element.major : svg_info->element.minor,
angle == 0.0 ? svg_info->element.minor : svg_info->element.major);
@@ -2221,7 +2221,7 @@
{
if (LocaleCompare((const char *) name,"image") == 0)
{
- MVGPrintf(svg_info->file,"image Over %.15g,%.15g %.15g,%.15g '%s'\n",
+ MVGPrintf(svg_info->file,"image Over %g,%g %g,%g '%s'\n",
svg_info->bounds.x,svg_info->bounds.y,svg_info->bounds.width,
svg_info->bounds.height,svg_info->url);
MVGPrintf(svg_info->file,"pop graphic-context\n");
@@ -2234,7 +2234,7 @@
{
if (LocaleCompare((const char *) name,"line") == 0)
{
- MVGPrintf(svg_info->file,"line %.15g,%.15g %.15g,%.15g\n",
+ MVGPrintf(svg_info->file,"line %g,%g %g,%g\n",
svg_info->segment.x1,svg_info->segment.y1,svg_info->segment.x2,
svg_info->segment.y2);
MVGPrintf(svg_info->file,"pop graphic-context\n");
@@ -2287,7 +2287,7 @@
{
if ((svg_info->radius.x == 0.0) && (svg_info->radius.y == 0.0))
{
- MVGPrintf(svg_info->file,"rectangle %.15g,%.15g %.15g,%.15g\n",
+ MVGPrintf(svg_info->file,"rectangle %g,%g %g,%g\n",
svg_info->bounds.x,svg_info->bounds.y,
svg_info->bounds.x+svg_info->bounds.width,
svg_info->bounds.y+svg_info->bounds.height);
@@ -2299,7 +2299,7 @@
if (svg_info->radius.y == 0.0)
svg_info->radius.y=svg_info->radius.x;
MVGPrintf(svg_info->file,
- "roundRectangle %.15g,%.15g %.15g,%.15g %.15g,%.15g\n",
+ "roundRectangle %g,%g %g,%g %g,%g\n",
svg_info->bounds.x,svg_info->bounds.y,svg_info->bounds.x+
svg_info->bounds.width,svg_info->bounds.y+svg_info->bounds.height,
svg_info->radius.x,svg_info->radius.y);
@@ -2338,7 +2338,7 @@
text=EscapeString(svg_info->text,'\'');
StripString(text);
- MVGPrintf(svg_info->file,"text %.15g,%.15g '%s'\n",
+ MVGPrintf(svg_info->file,"text %g,%g '%s'\n",
svg_info->bounds.x-svg_info->center.x,svg_info->bounds.y-
svg_info->center.y,text);
text=DestroyString(text);
@@ -2362,7 +2362,7 @@
text=EscapeString(svg_info->text,'\'');
StripString(text);
- MVGPrintf(svg_info->file,"text %.15g,%.15g '%s'\n",
+ MVGPrintf(svg_info->file,"text %g,%g '%s'\n",
svg_info->bounds.x,svg_info->bounds.y,text);
text=DestroyString(text);
draw_info=CloneDrawInfo(svg_info->image_info,(DrawInfo *) NULL);
@@ -3178,7 +3178,7 @@
return;
}
(void) FormatMagickString(transform,MaxTextExtent,
- "\" transform=\"scale(%.15g,%.15g)\">\n",affine->sx,affine->sy);
+ "\" transform=\"scale(%g,%g)\">\n",affine->sx,affine->sy);
(void) WriteBlobString(image,transform);
return;
}
@@ -3194,7 +3194,7 @@
theta=(180.0/MagickPI)*atan2(affine->rx,affine->sx);
(void) FormatMagickString(transform,MaxTextExtent,
- "\" transform=\"rotate(%.15g)\">\n",theta);
+ "\" transform=\"rotate(%g)\">\n",theta);
(void) WriteBlobString(image,transform);
return;
}
@@ -3208,13 +3208,13 @@
(fabs(affine->sy-1.0) < MagickEpsilon))
{
(void) FormatMagickString(transform,MaxTextExtent,
- "\" transform=\"translate(%.15g,%.15g)\">\n",affine->tx,affine->ty);
+ "\" transform=\"translate(%g,%g)\">\n",affine->tx,affine->ty);
(void) WriteBlobString(image,transform);
return;
}
}
(void) FormatMagickString(transform,MaxTextExtent,
- "\" transform=\"matrix(%.15g %.15g %.15g %.15g %.15g %.15g)\">\n",
+ "\" transform=\"matrix(%g %g %g %g %g %g)\">\n",
affine->sx,affine->rx,affine->ry,affine->sy,affine->tx,affine->ty);
(void) WriteBlobString(image,transform);
}
@@ -3850,8 +3850,8 @@
svg_info.segment.y2=StringToDouble(token);
svg_info.element.minor=StringToDouble(token);
(void) FormatMagickString(message,MaxTextExtent,
- "<%sGradient id=\"%s\" x1=\"%.15g\" y1=\"%.15g\" x2=\"%.15g\" "
- "y2=\"%.15g\">\n",type,name,svg_info.segment.x1,
+ "<%sGradient id=\"%s\" x1=\"%g\" y1=\"%g\" x2=\"%g\" "
+ "y2=\"%g\">\n",type,name,svg_info.segment.x1,
svg_info.segment.y1,svg_info.segment.x2,svg_info.segment.y2);
if (LocaleCompare(type,"radial") == 0)
{
@@ -3860,8 +3860,8 @@
GetMagickToken(q,&q,token);
svg_info.element.angle=StringToDouble(token);
(void) FormatMagickString(message,MaxTextExtent,
- "<%sGradient id=\"%s\" cx=\"%.15g\" cy=\"%.15g\" r=\"%.15g\" "
- "fx=\"%.15g\" fy=\"%.15g\">\n",type,name,
+ "<%sGradient id=\"%s\" cx=\"%g\" cy=\"%g\" r=\"%g\" "
+ "fx=\"%g\" fy=\"%g\">\n",type,name,
svg_info.element.cx,svg_info.element.cy,
svg_info.element.angle,svg_info.element.major,
svg_info.element.minor);
@@ -3899,8 +3899,8 @@
GetMagickToken(q,&q,token);
svg_info.bounds.height=StringToDouble(token);
(void) FormatMagickString(message,MaxTextExtent,
- "<pattern id=\"%s\" x=\"%.15g\" y=\"%.15g\" width=\"%.15g\" "
- "height=\"%.15g\">\n",name,svg_info.bounds.x,
+ "<pattern id=\"%s\" x=\"%g\" y=\"%g\" width=\"%g\" "
+ "height=\"%g\">\n",name,svg_info.bounds.x,
svg_info.bounds.y,svg_info.bounds.width,
svg_info.bounds.height);
(void) WriteBlobString(image,message);
@@ -4204,7 +4204,7 @@
break;
}
(void) FormatMagickString(message,MaxTextExtent,
- " <line x1=\"%.15g\" y1=\"%.15g\" x2=\"%.15g\" y2=\"%.15g\"/>\n",
+ " <line x1=\"%g\" y1=\"%g\" x2=\"%g\" y2=\"%g\"/>\n",
primitive_info[j].point.x,primitive_info[j].point.y,
primitive_info[j+1].point.x,primitive_info[j+1].point.y);
(void) WriteBlobString(image,message);
@@ -4218,7 +4218,7 @@
break;
}
(void) FormatMagickString(message,MaxTextExtent,
- " <rect x=\"%.15g\" y=\"%.15g\" width=\"%.15g\" height=\"%.15g\"/>\n",
+ " <rect x=\"%g\" y=\"%g\" width=\"%g\" height=\"%g\"/>\n",
primitive_info[j].point.x,primitive_info[j].point.y,
primitive_info[j+1].point.x-primitive_info[j].point.x,
primitive_info[j+1].point.y-primitive_info[j].point.y);
@@ -4233,8 +4233,8 @@
break;
}
(void) FormatMagickString(message,MaxTextExtent,
- " <rect x=\"%.15g\" y=\"%.15g\" width=\"%.15g\" height=\"%.15g\" rx=\"%.15g\" "
- "ry=\"%.15g\"/>\n",primitive_info[j].point.x,
+ " <rect x=\"%g\" y=\"%g\" width=\"%g\" height=\"%g\" rx=\"%g\" "
+ "ry=\"%g\"/>\n",primitive_info[j].point.x,
primitive_info[j].point.y,primitive_info[j+1].point.x-
primitive_info[j].point.x,primitive_info[j+1].point.y-
primitive_info[j].point.y,primitive_info[j+2].point.x,
@@ -4259,7 +4259,7 @@
break;
}
(void) FormatMagickString(message,MaxTextExtent,
- " <ellipse cx=\"%.15g\" cy=\"%.15g\" rx=\"%.15g\" ry=\"%.15g\"/>\n",
+ " <ellipse cx=\"%g\" cy=\"%g\" rx=\"%g\" ry=\"%g\"/>\n",
primitive_info[j].point.x,primitive_info[j].point.y,
primitive_info[j+1].point.x,primitive_info[j+1].point.y);
(void) WriteBlobString(image,message);
@@ -4279,7 +4279,7 @@
alpha=primitive_info[j+1].point.x-primitive_info[j].point.x;
beta=primitive_info[j+1].point.y-primitive_info[j].point.y;
(void) FormatMagickString(message,MaxTextExtent,
- " <circle cx=\"%.15g\" cy=\"%.15g\" r=\"%.15g\"/>\n",
+ " <circle cx=\"%g\" cy=\"%g\" r=\"%g\"/>\n",
primitive_info[j].point.x,primitive_info[j].point.y,
hypot(alpha,beta));
(void) WriteBlobString(image,message);
@@ -4297,7 +4297,7 @@
length=strlen(message);
for ( ; j < i; j++)
{
- (void) FormatMagickString(message,MaxTextExtent,"%.15g,%.15g ",
+ (void) FormatMagickString(message,MaxTextExtent,"%g,%g ",
primitive_info[j].point.x,primitive_info[j].point.y);
length+=strlen(message);
if (length >= 80)
@@ -4326,7 +4326,7 @@
length=strlen(message);
for ( ; j < i; j++)
{
- (void) FormatMagickString(message,MaxTextExtent,"%.15g,%.15g ",
+ (void) FormatMagickString(message,MaxTextExtent,"%g,%g ",
primitive_info[j].point.x,primitive_info[j].point.y);
length+=strlen(message);
if (length >= 80)
@@ -4409,7 +4409,7 @@
}
GetMagickToken(q,&q,token);
(void) FormatMagickString(message,MaxTextExtent,
- " <text x=\"%.15g\" y=\"%.15g\">",primitive_info[j].point.x,
+ " <text x=\"%g\" y=\"%g\">",primitive_info[j].point.x,
primitive_info[j].point.y);
(void) WriteBlobString(image,message);
for (p=token; *p != '\0'; p++)
@@ -4432,7 +4432,7 @@
}
GetMagickToken(q,&q,token);
(void) FormatMagickString(message,MaxTextExtent,
- " <image x=\"%.15g\" y=\"%.15g\" width=\"%.15g\" height=\"%.15g\" "
+ " <image x=\"%g\" y=\"%g\" width=\"%g\" height=\"%g\" "
"xlink:href=\"%s\"/>\n",primitive_info[j].point.x,
primitive_info[j].point.y,primitive_info[j+1].point.x,
primitive_info[j+1].point.y,token);
diff --git a/coders/tiff.c b/coders/tiff.c
index dfe1af9..3b06e3e 100644
--- a/coders/tiff.c
+++ b/coders/tiff.c
@@ -620,7 +620,7 @@
rational;
if (TIFFGetField(tiff,exif_info[i].tag,&rational) != 0)
- (void) FormatMagickString(value,MaxTextExtent,"%.15g",rational);
+ (void) FormatMagickString(value,MaxTextExtent,"%g",rational);
break;
}
default:
diff --git a/coders/wmf.c b/coders/wmf.c
index aee1724..4f74881 100644
--- a/coders/wmf.c
+++ b/coders/wmf.c
@@ -563,8 +563,8 @@
#if 0
printf("bmp_draw->bmp.data = 0x%lx\n", (long)bmp_draw->bmp.data);
printf("registry id = %li\n", id);
- /* printf("pixel_width = %.15g\n", bmp_draw->pixel_width); */
- /* printf("pixel_height = %.15g\n", bmp_draw->pixel_height); */
+ /* printf("pixel_width = %g\n", bmp_draw->pixel_width); */
+ /* printf("pixel_height = %g\n", bmp_draw->pixel_height); */
printf("bmp_draw->bmp WxH = %ix%i\n", bmp_draw->bmp.width, bmp_draw->bmp.height);
printf("bmp_draw->crop WxH = %ix%i\n", bmp_draw->crop.w, bmp_draw->crop.h);
printf("bmp_draw->crop x,y = %i,%i\n", bmp_draw->crop.x, bmp_draw->crop.y);
@@ -1348,11 +1348,11 @@
printf("Text = \"%s\"\n", draw_text->str);
/* printf("WMF_FONT_NAME: = \"%s\"\n", WMF_FONT_NAME(font)); */
printf("WMF_FONT_PSNAME: = \"%s\"\n", WMF_FONT_PSNAME(font));
- printf("Bounding box TL=%.15g,%.15g BR=%.15g,%.15g\n",
+ printf("Bounding box TL=%g,%g BR=%g,%g\n",
TL.x, TL.y, BR.x, BR.y );
- /* printf("Text box = %.15gx%.15g\n", bbox_width, bbox_height); */
+ /* printf("Text box = %gx%g\n", bbox_width, bbox_height); */
/* printf("WMF_FONT_HEIGHT = %i\n", (int)WMF_FONT_HEIGHT(font)); */
- printf("Pointsize = %.15g\n", pointsize);
+ printf("Pointsize = %g\n", pointsize);
fflush(stdout);
#endif
@@ -2053,13 +2053,13 @@
#if 0
printf("String = %s\n", str);
printf("Font = %s\n", WMF_FONT_PSNAME(font));
- printf("lfHeight = %.15g\n", font_height);
- printf("bounds = %.15g,%.15g %.15g,%.15g\n", metrics.bounds.x1, metrics.bounds.y1,
+ printf("lfHeight = %g\n", font_height);
+ printf("bounds = %g,%g %g,%g\n", metrics.bounds.x1, metrics.bounds.y1,
metrics.bounds.x2,metrics.bounds.y2);
- printf("ascent = %.15g\n", metrics.ascent);
- printf("descent = %.15g\n", metrics.descent);
- printf("height = %.15g\n", metrics.height);
- printf("Pointsize = %.15g\n", pointsize);
+ printf("ascent = %g\n", metrics.ascent);
+ printf("descent = %g\n", metrics.descent);
+ printf("height = %g\n", metrics.height);
+ printf("Pointsize = %g\n", pointsize);
#endif
return floor(pointsize);
@@ -2157,7 +2157,7 @@
printf("string = \"%s\"\n", str);
printf("WMF_FONT_NAME = \"%s\"\n", WMF_FONT_NAME(font));
printf("WMF_FONT_PSNAME = \"%s\"\n", WMF_FONT_PSNAME(font));
- printf("stringwidth = %.15g\n", stringwidth);
+ printf("stringwidth = %g\n", stringwidth);
/* printf("WMF_FONT_HEIGHT = %i\n", (int)WMF_FONT_HEIGHT(font)); */
/* printf("WMF_FONT_WIDTH = %i\n", (int)WMF_FONT_WIDTH(font)); */
fflush(stdout);
@@ -2608,27 +2608,27 @@
(API)->File->placeable ? "Yes" : "No");
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
- " Size in metafile units: %.15gx%.15g",wmf_width,wmf_height);
+ " Size in metafile units: %gx%g",wmf_width,wmf_height);
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
- " Metafile units/inch: %.15g",units_per_inch);
+ " Metafile units/inch: %g",units_per_inch);
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
- " Size in inches: %.15gx%.15g",
+ " Size in inches: %gx%g",
image_width_inch,image_height_inch);
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
- " Bounding Box: %.15g,%.15g %.15g,%.15g",
+ " Bounding Box: %g,%g %g,%g",
bbox.TL.x, bbox.TL.y, bbox.BR.x, bbox.BR.y);
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
- " Bounding width x height: %.15gx%.15g",bounding_width,
+ " Bounding width x height: %gx%g",bounding_width,
bounding_height);
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
- " Output resolution: %.15gx%.15g",resolution_x,resolution_y);
+ " Output resolution: %gx%g",resolution_x,resolution_y);
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
- " Image size: %.15gx%.15g",image_width,image_height);
+ " Image size: %gx%g",image_width,image_height);
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
- " Bounding box scale factor: %.15g,%.15g",ddata->scale_x,
+ " Bounding box scale factor: %g,%g",ddata->scale_x,
ddata->scale_y);
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
- " Translation: %.15g,%.15g",
+ " Translation: %g,%g",
ddata->translate_x, ddata->translate_y);
}
@@ -2656,8 +2656,8 @@
printf("dc->Window.Oy = %d\n", dc->Window.Oy);
printf("dc->Window.width = %d\n", dc->Window.width);
printf("dc->Window.height = %d\n", dc->Window.height);
- printf("dc->pixel_width = %.15g\n", dc->pixel_width);
- printf("dc->pixel_height = %.15g\n", dc->pixel_height);
+ printf("dc->pixel_width = %g\n", dc->pixel_width);
+ printf("dc->pixel_height = %g\n", dc->pixel_height);
#if defined(MAGICKCORE_WMFLITE_DELEGATE) /* Only in libwmf 0.3 */
printf("dc->Ox = %.d\n", dc->Ox);
printf("dc->Oy = %.d\n", dc->Oy);
diff --git a/coders/xps.c b/coders/xps.c
index 47ddce1..a6dd479 100644
--- a/coders/xps.c
+++ b/coders/xps.c
@@ -191,7 +191,7 @@
if ((flags & SigmaValue) == 0)
image->y_resolution=image->x_resolution;
}
- (void) FormatMagickString(density,MaxTextExtent,"%.15gx%.15g",
+ (void) FormatMagickString(density,MaxTextExtent,"%gx%g",
image->x_resolution,image->y_resolution);
/*
Determine page geometry from the XPS media box.