1817
1819
(void) WriteBlobString(image,"id=ImageMagick version=1.0\n");
1818
1820
(void) FormatMagickString(buffer,MaxTextExtent,
1819
"class=%s colors=%lu matte=%s\n",MagickOptionToMnemonic(
1820
MagickClassOptions,image->storage_class),image->colors,
1821
MagickOptionToMnemonic(MagickBooleanOptions,(long) image->matte));
1821
"class=%s colors=%.20g matte=%s\n",MagickOptionToMnemonic(
1822
MagickClassOptions,image->storage_class),(double) image->colors,
1823
MagickOptionToMnemonic(MagickBooleanOptions,(ssize_t) image->matte));
1822
1824
(void) WriteBlobString(image,buffer);
1823
(void) FormatMagickString(buffer,MaxTextExtent,"columns=%lu rows=%lu "
1824
"depth=%lu\n",image->columns,image->rows,image->depth);
1825
(void) FormatMagickString(buffer,MaxTextExtent,"columns=%.20g rows=%.20g "
1826
"depth=%.20g\n",(double) image->columns,(double) image->rows,(double)
1825
1828
(void) WriteBlobString(image,buffer);
1826
1829
if (image->type != UndefinedType)
1851
1854
if ((image->x_resolution != 0) || (image->y_resolution != 0))
1853
(void) FormatMagickString(buffer,MaxTextExtent,"resolution=%gx%g\n",
1854
image->x_resolution,image->y_resolution);
1856
(void) FormatMagickString(buffer,MaxTextExtent,
1857
"resolution=%gx%g\n",image->x_resolution,image->y_resolution);
1855
1858
(void) WriteBlobString(image,buffer);
1857
1860
if ((image->page.width != 0) || (image->page.height != 0))
1859
(void) FormatMagickString(buffer,MaxTextExtent,"page=%lux%lu%+ld%+ld\n",
1860
image->page.width,image->page.height,image->page.x,image->page.y);
1862
(void) FormatMagickString(buffer,MaxTextExtent,
1863
"page=%.20gx%.20g%+.20g%+.20g\n",(double) image->page.width,(double)
1864
image->page.height,(double) image->page.x,(double) image->page.y);
1861
1865
(void) WriteBlobString(image,buffer);
1864
1868
if ((image->page.x != 0) || (image->page.y != 0))
1866
1870
(void) FormatMagickString(buffer,MaxTextExtent,"page=%+ld%+ld\n",
1867
image->page.x,image->page.y);
1871
(long) image->page.x,(long) image->page.y);
1868
1872
(void) WriteBlobString(image,buffer);
1870
1874
if ((image->tile_offset.x != 0) || (image->tile_offset.y != 0))
1872
1876
(void) FormatMagickString(buffer,MaxTextExtent,"tile-offset=%+ld%+ld\n",
1873
image->tile_offset.x,image->tile_offset.y);
1877
(long) image->tile_offset.x,(long) image->tile_offset.y);
1874
1878
(void) WriteBlobString(image,buffer);
1876
1880
if ((GetNextImageInList(image) != (Image *) NULL) ||
1877
1881
(GetPreviousImageInList(image) != (Image *) NULL))
1879
1883
if (image->scene == 0)
1880
(void) FormatMagickString(buffer,MaxTextExtent,"iterations=%lu "
1881
"delay=%lu ticks-per-second=%lu\n",image->iterations,image->delay,
1882
image->ticks_per_second);
1884
(void) FormatMagickString(buffer,MaxTextExtent,"iterations=%.20g "
1885
"delay=%.20g ticks-per-second=%.20g\n",(double) image->iterations,
1886
(double) image->delay,(double) image->ticks_per_second);
1884
(void) FormatMagickString(buffer,MaxTextExtent,"scene=%lu "
1885
"iterations=%lu delay=%lu ticks-per-second=%lu\n",image->scene,
1886
image->iterations,image->delay,image->ticks_per_second);
1888
(void) FormatMagickString(buffer,MaxTextExtent,"scene=%.20g "
1889
"iterations=%.20g delay=%.20g ticks-per-second=%.20g\n",(double)
1890
image->scene,(double) image->iterations,(double) image->delay,
1891
(double) image->ticks_per_second);
1887
1892
(void) WriteBlobString(image,buffer);
1891
1896
if (image->scene != 0)
1893
(void) FormatMagickString(buffer,MaxTextExtent,"scene=%lu\n",
1898
(void) FormatMagickString(buffer,MaxTextExtent,"scene=%.20g\n",
1899
(double) image->scene);
1895
1900
(void) WriteBlobString(image,buffer);
1897
1902
if (image->iterations != 0)
1899
(void) FormatMagickString(buffer,MaxTextExtent,"iterations=%lu\n",
1904
(void) FormatMagickString(buffer,MaxTextExtent,"iterations=%.20g\n",
1905
(double) image->iterations);
1901
1906
(void) WriteBlobString(image,buffer);
1903
1908
if (image->delay != 0)
1905
(void) FormatMagickString(buffer,MaxTextExtent,"delay=%lu\n",
1910
(void) FormatMagickString(buffer,MaxTextExtent,"delay=%.20g\n",
1911
(double) image->delay);
1907
1912
(void) WriteBlobString(image,buffer);
1909
1914
if (image->ticks_per_second != UndefinedTicksPerSecond)
1911
1916
(void) FormatMagickString(buffer,MaxTextExtent,
1912
"ticks-per-second=%lu\n",image->ticks_per_second);
1917
"ticks-per-second=%.20g\n",(double) image->ticks_per_second);
1913
1918
(void) WriteBlobString(image,buffer);
1944
1949
Note chomaticity points.
1946
(void) FormatMagickString(buffer,MaxTextExtent,"red-primary=%g,%g "
1947
"green-primary=%g,%g blue-primary=%g,%g\n",
1951
(void) FormatMagickString(buffer,MaxTextExtent,"red-primary=%g,"
1952
"%g green-primary=%g,%g blue-primary=%g,%g\n",
1948
1953
image->chromaticity.red_primary.x,image->chromaticity.red_primary.y,
1949
1954
image->chromaticity.green_primary.x,
1950
1955
image->chromaticity.green_primary.y,
1951
1956
image->chromaticity.blue_primary.x,
1952
1957
image->chromaticity.blue_primary.y);
1953
1958
(void) WriteBlobString(image,buffer);
1954
(void) FormatMagickString(buffer,MaxTextExtent,"white-point=%g,%g\n",
1955
image->chromaticity.white_point.x,image->chromaticity.white_point.y);
1959
(void) FormatMagickString(buffer,MaxTextExtent,
1960
"white-point=%g,%g\n",image->chromaticity.white_point.x,
1961
image->chromaticity.white_point.y);
1956
1962
(void) WriteBlobString(image,buffer);
1958
1964
if (image->orientation != UndefinedOrientation)
2003
2010
value=GetImageProperty(image,property);
2004
2011
if (value != (const char *) NULL)
2006
for (i=0; i < (long) strlen(value); i++)
2013
for (i=0; i < (ssize_t) strlen(value); i++)
2007
2014
if (isspace((int) ((unsigned char) value[i])) != 0)
2009
if (i <= (long) strlen(value))
2016
if (i <= (ssize_t) strlen(value))
2010
2017
(void) WriteBlobByte(image,'{');
2011
2018
(void) WriteBlob(image,strlen(value),(const unsigned char *) value);
2012
if (i <= (long) strlen(value))
2019
if (i <= (ssize_t) strlen(value))
2013
2020
(void) WriteBlobByte(image,'}');
2015
2022
(void) WriteBlobByte(image,'\n');