ExceptionInfo exceptionInfo;
GetExceptionInfo( &exceptionInfo );
_imgRef->id(_imgRef->id()+1);
- sprintf(id,"%ld\n",(long) _imgRef->id());
+ sprintf(id,"%.20g\n",(double) _imgRef->id());
SetImageRegistry(ImageRegistryType, id, image(), &exceptionInfo);
throwException( exceptionInfo );
(void) DestroyExceptionInfo( &exceptionInfo );
if( _id > -1 )
{
char id[MaxTextExtent];
- sprintf(id,"%ld",(long) _id);
+ sprintf(id,"%.20g",(double) _id);
DeleteImageRegistry( id );
_id=-1;
}
if( _id > -1 )
{
char id[MaxTextExtent];
- sprintf(id,"%ld",(long) _id);
+ sprintf(id,"%.20g",(double) _id);
DeleteImageRegistry( id );
}
_id = id_;
default:
break;
}
- (void) fprintf(stderr,"GetList: UnrecognizedType %ld\n",
- (long) SvTYPE(reference));
+ (void) fprintf(stderr,"GetList: UnrecognizedType %.20g\n",
+ (double) SvTYPE(reference));
return((Image *) NULL);
}
\f
break;
page=GetImageBoundingBox(image,&image->exception);
(void) FormatMagickString(geometry,MaxTextExtent,
- "%lux%lu%+ld%+ld",(unsigned long) page.width,(unsigned long)
- page.height,(long) page.x,(long) page.y);
+ "%.20gx%.20g%+.20gx%+.20g",(double) page.width,(double)
+ page.height,(double) page.x,(double) page.y);
s=newSVpv(geometry,0);
PUSHs(s ? sv_2mortal(s) : &sv_undef);
continue;
static ssize_t
id = 0;
- (void) FormatMagickString(key,MaxTextExtent,"%ld\n",(long)
+ (void) FormatMagickString(key,MaxTextExtent,"%.20g\n",(double)
id);
status=SetImageRegistry(ImageRegistryType,key,image,
&image->exception);
geometry[MaxTextExtent];
(void) FormatMagickString(geometry,MaxTextExtent,
- "%lux%lu%+ld%+ld",(unsigned long) image->page.width,
- (unsigned long) image->page.height,(long) image->page.x,
- (long) image->page.y);
+ "%.20gx%.20g%+.20gx%+.20g",(double) image->page.width,
+ (double) image->page.height,(double) image->page.x,(double)
+ image->page.y);
s=newSVpv(geometry,0);
}
PUSHs(s ? sv_2mortal(s) : &sv_undef);
(void) FormatMagickString(message,MaxTextExtent,QuantumFormat,
histogram[i].pixel.opacity);
PUSHs(sv_2mortal(newSVpv(message,0)));
- (void) FormatMagickString(message,MaxTextExtent,"%lu",
- (unsigned long) histogram[i].count);
+ (void) FormatMagickString(message,MaxTextExtent,"%.20g",(double)
+ histogram[i].count);
PUSHs(sv_2mortal(newSVpv(message,0)));
}
histogram=(ColorPacket *) RelinquishMagickMemory(histogram);
{
default:
{
- (void) FormatMagickString(message,MaxTextExtent,"%ld",(long) ix);
+ (void) FormatMagickString(message,MaxTextExtent,"%.20g",(double) ix);
ThrowPerlException(exception,OptionError,
"UnrecognizedPerlMagickMethod",message);
goto PerlException;
Composite two images (normal composition).
*/
(void) FormatMagickString(composite_geometry,MaxTextExtent,
- "%lux%lu%+ld%+ld",(unsigned long) composite_image->columns,
- (unsigned long) composite_image->rows,(long) geometry.x,(long)
+ "%.20gx%.20g%+.20gx%+.20g",(double) composite_image->columns,
+ (double) composite_image->rows,(double) geometry.x,(double)
geometry.y);
flags=ParseGravityGeometry(image,composite_geometry,&geometry,
exception);
else
PUSHs(sv_2mortal(newSVpv(MagickOptionToMnemonic(MagickStretchOptions,
type_info->stretch),0)));
- (void) FormatMagickString(message,MaxTextExtent,"%lu",(unsigned long)
+ (void) FormatMagickString(message,MaxTextExtent,"%.20g",(double)
type_info->weight);
PUSHs(sv_2mortal(newSVpv(message,0)));
if (type_info->encoding == (char *) NULL)
{
#define ChannelStatistics(channel) \
{ \
- (void) FormatMagickString(message,MaxTextExtent,"%lu", \
- (unsigned long) channel_statistics[channel].depth); \
+ (void) FormatMagickString(message,MaxTextExtent,"%.20g", \
+ (double) channel_statistics[channel].depth); \
PUSHs(sv_2mortal(newSVpv(message,0))); \
(void) FormatMagickString(message,MaxTextExtent,"%.15g", \
channel_statistics[channel].minima/scale); \
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
" Format: OS/2 Bitmap");
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
- " Geometry: %lux%lu",(unsigned long) bmp_info.width,
- (unsigned long) bmp_info.height);
+ " Geometry: %.20gx%.20g",(double) bmp_info.width,(double)
+ bmp_info.height);
}
}
else
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
" Format: MS Windows bitmap");
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
- " Geometry: %lux%lu",(unsigned long) bmp_info.width,
- (unsigned long) bmp_info.height);
+ " Geometry: %.20gx%.20g",(double) bmp_info.width,(double)
+ bmp_info.height);
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
- " Bits per pixel: %lu",(unsigned long) bmp_info.bits_per_pixel);
+ " Bits per pixel: %.20g",(double) bmp_info.bits_per_pixel);
switch ((int) bmp_info.compression)
{
case BI_RGB:
*/
if (image->debug != MagickFalse)
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
- " Reading colormap of %lu colors",(unsigned long) image->colors);
+ " Reading colormap of %.20g colors",(double) image->colors);
if (AcquireImageColormap(image,image->colors) == MagickFalse)
ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed");
bmp_colormap=(unsigned char *) AcquireQuantumMemory((size_t)
{
if (image->debug != MagickFalse)
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
- " Reading pixels (%lu bytes)",(unsigned long) length);
+ " Reading pixels (%.20g bytes)",(double) length);
count=ReadBlob(image,length,pixels);
if (count != (ssize_t) length)
ThrowReaderException(CorruptImageError,"InsufficientImageDataInFile");
if (image->debug != MagickFalse)
{
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
- " Writing BMP version %ld datastream",(long) type);
+ " Writing BMP version %.20g datastream",(double) type);
if (image->storage_class == DirectClass)
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
" Storage class=DirectClass");
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
" Storage class=PseudoClass");
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
- " Image depth=%lu",(unsigned long) image->depth);
+ " Image depth=%.20g",(double) image->depth);
if (image->matte != MagickFalse)
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
" Matte=True");
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
" Matte=MagickFalse");
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
- " BMP bits_per_pixel=%lu",(unsigned long) bmp_info.bits_per_pixel);
+ " BMP bits_per_pixel=%.20g",(double) bmp_info.bits_per_pixel);
switch ((int) bmp_info.compression)
{
case BI_RGB:
*/
if (image->debug != MagickFalse)
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
- " Colormap: %lu entries",(unsigned long) image->colors);
+ " Colormap: %.20g entries",(double) image->colors);
bmp_colormap=(unsigned char *) AcquireQuantumMemory((size_t) (1UL <<
bmp_info.bits_per_pixel),4*sizeof(*bmp_colormap));
if (bmp_colormap == (unsigned char *) NULL)
}
if (image->page.x)
{
- (void) FormatMagickString(buffer,MaxTextExtent,"X: %ld\n",(long)
+ (void) FormatMagickString(buffer,MaxTextExtent,"X: %.20g\n",(double)
image->page.x);
(void) WriteBlobString(image,buffer);
}
if (image->page.y)
{
- (void) FormatMagickString(buffer,MaxTextExtent,"Y: %ld\n",(long)
+ (void) FormatMagickString(buffer,MaxTextExtent,"Y: %.20g\n",(double)
image->page.y);
(void) WriteBlobString(image,buffer);
}
- (void) FormatMagickString(buffer,MaxTextExtent,"Width: %lu\n",
- (unsigned long) (image->columns+(image->columns % 2)));
+ (void) FormatMagickString(buffer,MaxTextExtent,"Width: %.20g\n",
+ (double) (image->columns+(image->columns % 2)));
(void) WriteBlobString(image,buffer);
- (void) FormatMagickString(buffer,MaxTextExtent,"Height: %lu\n",
- (unsigned long) image->rows);
+ (void) FormatMagickString(buffer,MaxTextExtent,"Height: %.20g\n",
+ (double) image->rows);
(void) WriteBlobString(image,buffer);
(void) WriteBlobString(image,"\n");
}
cin.origination.x_offset=(ssize_t) ReadBlobLong(image);
offset+=4;
if ((size_t) cin.origination.x_offset != ~0UL)
- (void) FormatImageProperty(image,"cin:origination.x_offset","%ld",
- (long) cin.origination.x_offset);
+ (void) FormatImageProperty(image,"cin:origination.x_offset","%.20g",
+ (double) cin.origination.x_offset);
cin.origination.y_offset=(ssize_t) ReadBlobLong(image);
offset+=4;
if ((size_t) cin.origination.y_offset != ~0UL)
- (void) FormatImageProperty(image,"cin:origination.y_offset","%ld",
- (long) cin.origination.y_offset);
+ (void) FormatImageProperty(image,"cin:origination.y_offset","%.20g",
+ (double) cin.origination.y_offset);
offset+=ReadBlob(image,sizeof(cin.origination.filename),(unsigned char *)
cin.origination.filename);
(void) SetImageProperty(image,"cin:origination.filename",
cin.film.prefix=ReadBlobLong(image);
offset+=4;
if (cin.film.prefix != ~0UL)
- (void) FormatImageProperty(image,"cin:film.prefix","%lu",(unsigned long)
+ (void) FormatImageProperty(image,"cin:film.prefix","%.20g",(double)
cin.film.prefix);
cin.film.count=ReadBlobLong(image);
offset+=4;
cin.film.frame_position=ReadBlobLong(image);
offset+=4;
if (cin.film.frame_position != ~0UL)
- (void) FormatImageProperty(image,"cin:film.frame_position","%lu",
- (unsigned long) cin.film.frame_position);
+ (void) FormatImageProperty(image,"cin:film.frame_position","%.20g",
+ (double) cin.film.frame_position);
cin.film.frame_rate=ReadBlobFloat(image);
offset+=4;
if (IsFloatDefined(cin.film.frame_rate) != MagickFalse)
basename);
}
(void) WriteBlobString(image,buffer);
- (void) FormatMagickString(buffer,MaxTextExtent,"<LocationX>%ld</LocationX>\n",
- (long) image->page.x);
+ (void) FormatMagickString(buffer,MaxTextExtent,
+ "<LocationX>%.20g</LocationX>\n",(double) image->page.x);
(void) WriteBlobString(image,buffer);
- (void) FormatMagickString(buffer,MaxTextExtent,"<LocationY>%ld</LocationY>\n",
- (long) image->page.y);
+ (void) FormatMagickString(buffer,MaxTextExtent,
+ "<LocationY>%.20g</LocationY>\n",(double) image->page.y);
(void) WriteBlobString(image,buffer);
- (void) FormatMagickString(buffer,MaxTextExtent,"<Width>%lu</Width>\n",
- (unsigned long) (image->columns+(image->columns % 2)));
+ (void) FormatMagickString(buffer,MaxTextExtent,"<Width>%.20g</Width>\n",
+ (double) (image->columns+(image->columns % 2)));
(void) WriteBlobString(image,buffer);
- (void) FormatMagickString(buffer,MaxTextExtent,"<Height>%lu</Height>\n",
- (unsigned long) image->rows);
+ (void) FormatMagickString(buffer,MaxTextExtent,"<Height>%.20g</Height>\n",
+ (double) image->rows);
(void) WriteBlobString(image,buffer);
(void) FormatMagickString(buffer,MaxTextExtent,"<Depth>2</Depth>\n");
(void) WriteBlobString(image,buffer);
/* is this useful? */
}
#if DEBUG
- printf("now filling %ld x %ld\n", image->columns,image->rows);
+ printf("now filling %.20g x %.20g\n",(double) image->columns,(double)
+ image->rows);
#endif
#if DEBUG
- printf("END: finished filling %ld x %ld\n", image->columns,image->rows);
+ printf("END: finished filling %.20g x %.20g\n",(double) image->columns,
+ (double) image->rows);
#endif
SyncImage(image);
dpx.television.interlace=(unsigned char) ReadBlobByte(image);
offset++;
if (dpx.television.interlace != 0)
- (void) FormatImageProperty(image,"dpx:television.interlace","%ld",
- (long) dpx.television.interlace);
+ (void) FormatImageProperty(image,"dpx:television.interlace","%.20g",
+ (double) dpx.television.interlace);
dpx.television.field_number=(unsigned char) ReadBlobByte(image);
offset++;
if (dpx.television.field_number != 0)
- (void) FormatImageProperty(image,"dpx:television.field_number","%ld",
- (long) dpx.television.field_number);
+ (void) FormatImageProperty(image,"dpx:television.field_number","%.20g",
+ (double) dpx.television.field_number);
dpx.television.video_signal=(unsigned char) ReadBlobByte(image);
offset++;
if (dpx.television.video_signal != 0)
- (void) FormatImageProperty(image,"dpx:television.video_signal","%ld",
- (long) dpx.television.video_signal);
+ (void) FormatImageProperty(image,"dpx:television.video_signal","%.20g",
+ (double) dpx.television.video_signal);
dpx.television.padding=(unsigned char) ReadBlobByte(image);
offset++;
if (dpx.television.padding != 0)
if (image->directory == (char *) NULL)
{
(void) FormatMagickString(buffer,MaxTextExtent,
- "%s\" shape=\"rect\" coords=\"0,0,%lu,%lu\" alt=\"\" />\n",
- image->filename,(unsigned long) geometry.width-1,(unsigned long)
- geometry.height-1);
+ "%s\" shape=\"rect\" coords=\"0,0,%.20g,%.20g\" alt=\"\" />\n",
+ image->filename,(double) geometry.width-1,(double) geometry.height-
+ 1);
(void) WriteBlobString(image,buffer);
}
else
else
{
(void) FormatMagickString(buffer,MaxTextExtent,
- "\" shape=\"rect\" coords=\"%ld,%ld,%ld,%ld\" alt=\"\" />\n",
- (long) geometry.x,(long) geometry.y,(long) (geometry.x+
- geometry.width-1),(long) (geometry.y+geometry.height-1));
+ "\" shape=\"rect\" coords=\"%.20g,%.20g,%.20g,%.20g\" alt=\"\" />\n",
+ (double) geometry.x,(double) geometry.y,(double) (geometry.x+
+ geometry.width-1),(double) (geometry.y+geometry.height-1));
(void) WriteBlobString(image,buffer);
if (*(p+1) != '\0')
{
if (image->directory == (char *) NULL)
{
(void) FormatMagickString(buffer,MaxTextExtent,
- "%s\" shape=\"rect\" coords=\"0,0,%lu,%lu\" alt=\"\" />\n",
- image->filename,(unsigned long) geometry.width-1,(unsigned long)
- geometry.height-1);
+ "%s\" shape=\"rect\" coords=\"0,0,%.20g,%.20g\" alt=\"\" />\n",
+ image->filename,(double) geometry.width-1,(double) geometry.height-1);
(void) WriteBlobString(image,buffer);
}
else
else
{
(void) FormatMagickString(buffer,MaxTextExtent,
- "\" shape=\"rect\" coords=\"%ld,%ld,%ld,%ld\" alt=\"\" />\n",
- (long) geometry.x,(long) geometry.y,geometry.x+(long)
- geometry.width-1,geometry.y+(long) geometry.height-1);
+ "\" shape=\"rect\" coords=\"%.20g,%.20g,%.20g,%.20g\" alt=\"\" />\n",
+ (double) geometry.x,(double) geometry.y,geometry.x+(double)
+ geometry.width-1,geometry.y+(double) geometry.height-1);
(void) WriteBlobString(image,buffer);
if (*(p+1) != '\0')
{
if (image->debug != MagickFalse)
{
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
- " scene = %lu",(unsigned long) i);
+ " scene = %.20g",(double) i);
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
- " size = %lu",(unsigned long) icon_info.size);
+ " size = %.20g",(double) icon_info.size);
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
- " width = %lu",(unsigned long) icon_file.directory[i].width);
+ " width = %.20g",(double) icon_file.directory[i].width);
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
- " height = %lu",(unsigned long) icon_file.directory[i].height);
+ " height = %.20g",(double) icon_file.directory[i].height);
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
- " colors = %lu",(unsigned long ) icon_info.number_colors);
+ " colors = %.20g",(double ) icon_info.number_colors);
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
- " planes = %lu",(unsigned long) icon_info.planes);
+ " planes = %.20g",(double) icon_info.planes);
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
- " bpp = %lu",(unsigned long) icon_info.bits_per_pixel);
+ " bpp = %.20g",(double) icon_info.bits_per_pixel);
}
if ((icon_info.number_colors != 0) || (icon_info.bits_per_pixel <= 16))
{
if (image->scene >= (image_info->scene+image_info->number_scenes-1))
break;
/*
- printf("Length: %lu, Memory size: %lu\n", length,(size_t)(image->depth));
+ printf("Length: %.20g, Memory size: %.20g\n", (double) length,(double)
+ image->depth);
*/
quantum_info=AcquireQuantumInfo(image_info,image);
if (quantum_info == (QuantumInfo *) NULL)
pixels=GetQuantumPixels(quantum_info);
if(image->columns != ipl_info.width){
/*
- printf("Columns not set correctly! Wanted: %lu, got: %lu\n",
- ipl_info.width, image->columns);
+ printf("Columns not set correctly! Wanted: %.20g, got: %.20g\n",
+ (double) ipl_info.width, (double) image->columns);
*/
}
blob=(jas_stream_memobj_t *) icc_stream->obj_;
if (image->debug != MagickFalse)
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
- "Profile: ICC, %lu bytes",(unsigned long) blob->len_);
+ "Profile: ICC, %.20g bytes",(double) blob->len_);
profile=AcquireStringInfo(blob->len_);
SetStringInfoDatum(profile,blob->buf_);
icc_profile=(StringInfo *) GetImageProfile(image,"icc");
}
if (image->debug != MagickFalse)
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
- "Profile: ICC, %lu bytes",(unsigned long) length);
+ "Profile: ICC, %.20g bytes",(double) length);
return(MagickTrue);
}
}
if (image->debug != MagickFalse)
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
- "Profile: iptc, %lu bytes",(unsigned long) length);
+ "Profile: iptc, %.20g bytes",(double) length);
return(MagickTrue);
}
image->filename);
if (image->debug != MagickFalse)
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
- "Profile: %s, %lu bytes",name,(unsigned long) length);
+ "Profile: %s, %.20g bytes",name,(double) length);
return(MagickTrue);
}
image->quality=(size_t) i+1;
if (image->debug != MagickFalse)
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
- "Quality: %ld (%s)",(long) i+1,(qvalue <= hash[i]) &&
+ "Quality: %.20g (%s)",(double) i+1,(qvalue <= hash[i]) &&
(sum <= sums[i]) ? "exact" : "approximate");
break;
}
image->quality=(size_t) i+1;
if (image->debug != MagickFalse)
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
- "Quality: %ld (%s)",(long) i+1,(qvalue <= hash[i]) &&
+ "Quality: %.20g (%s)",(double) i+1,(qvalue <= hash[i]) &&
(sum <= sums[i]) ? "exact" : "approximate");
break;
}
jpeg_info.scale_denom=(unsigned int) scale_factor;
jpeg_calc_output_dimensions(&jpeg_info);
if (image->debug != MagickFalse)
- (void) LogMagickEvent(CoderEvent,GetMagickModule(),"Scale factor: %ld",
- (long) scale_factor);
+ (void) LogMagickEvent(CoderEvent,GetMagickModule(),
+ "Scale factor: %.20g",(double) scale_factor);
}
precision=(size_t) jpeg_info.data_precision;
#if (JPEG_LIB_VERSION >= 61) && defined(D_PROGRESSIVE_SUPPORTED)
}
JPEGSetImageQuality(&jpeg_info,image);
JPEGSetImageSamplingFactor(&jpeg_info,image);
- (void) FormatMagickString(value,MaxTextExtent,"%ld",(long)
+ (void) FormatMagickString(value,MaxTextExtent,"%.20g",(double)
jpeg_info.out_color_space);
(void) SetImageProperty(image,"jpeg:colorspace",value);
if (image_info->ping != MagickFalse)
}
xmp_profile=DestroyStringInfo(xmp_profile);
}
- (void) LogMagickEvent(CoderEvent,GetMagickModule(),"%s profile: %lu bytes",
- name,(unsigned long) GetStringInfoLength(profile));
+ (void) LogMagickEvent(CoderEvent,GetMagickModule(),
+ "%s profile: %.20g bytes",name,(double) GetStringInfoLength(profile));
name=GetNextImageProfile(image);
}
custom_profile=DestroyStringInfo(custom_profile);
jpeg_info.density_unit=(UINT8) 1;
if (image->debug != MagickFalse)
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
- "Image resolution: %ld,%ld",(long) floor(image->x_resolution+0.5),
- (long) floor(image->y_resolution+0.5));
+ "Image resolution: %.20g,%.20g",floor(image->x_resolution+0.5),
+ floor(image->y_resolution+0.5));
if ((image->x_resolution != 0.0) && (image->y_resolution != 0.0))
{
/*
else
jpeg_set_quality(&jpeg_info,(int) image->quality,MagickTrue);
if (image->debug != MagickFalse)
- (void) LogMagickEvent(CoderEvent,GetMagickModule(),"Quality: %lu",
- (unsigned long) image->quality);
+ (void) LogMagickEvent(CoderEvent,GetMagickModule(),"Quality: %.20g",
+ (double) image->quality);
}
else
{
else
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
"Storage class: DirectClass");
- (void) LogMagickEvent(CoderEvent,GetMagickModule(),"Depth: %lu",
- (unsigned long) image->depth);
+ (void) LogMagickEvent(CoderEvent,GetMagickModule(),"Depth: %.20g",
+ (double) image->depth);
if (image->colors != 0)
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
- "Number of colors: %lu",(unsigned long) image->colors);
+ "Number of colors: %.20g",(double) image->colors);
else
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
"Number of colors: unspecified");
CellType = ReadBlobXXXLong(image2); /* Additional object type */
if (logging)
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
- "MATLAB_HDR.CellType: %ld",(long) CellType);
+ "MATLAB_HDR.CellType: %.20g",(double) CellType);
(void) ReadBlob(image2, 4, (unsigned char *) &size); /* data size */
*/
(void) WriteBlobString(image,"id=ImageMagick version=1.0\n");
(void) FormatMagickString(buffer,MaxTextExtent,
- "class=%s colors=%lu matte=%s\n",MagickOptionToMnemonic(
- MagickClassOptions,image->storage_class),(unsigned long) image->colors,
+ "class=%s colors=%.20g matte=%s\n",MagickOptionToMnemonic(
+ MagickClassOptions,image->storage_class),(double) image->colors,
MagickOptionToMnemonic(MagickBooleanOptions,(ssize_t) image->matte));
(void) WriteBlobString(image,buffer);
- (void) FormatMagickString(buffer,MaxTextExtent,"columns=%lu rows=%lu "
- "depth=%lu\n",(unsigned long) image->columns,(unsigned long) image->rows,
- (unsigned long) image->depth);
+ (void) FormatMagickString(buffer,MaxTextExtent,"columns=%.20g rows=%.20g "
+ "depth=%.20g\n",(double) image->columns,(double) image->rows,(double)
+ image->depth);
(void) WriteBlobString(image,buffer);
if (image->type != UndefinedType)
{
if (compression != UndefinedCompression)
{
(void) FormatMagickString(buffer,MaxTextExtent,"compression=%s "
- "quality=%lu\n",MagickOptionToMnemonic(MagickCompressOptions,
- compression),(unsigned long) image->quality);
+ "quality=%.20g\n",MagickOptionToMnemonic(MagickCompressOptions,
+ compression),(double) image->quality);
(void) WriteBlobString(image,buffer);
}
if (image->units != UndefinedResolution)
}
if ((image->page.width != 0) || (image->page.height != 0))
{
- (void) FormatMagickString(buffer,MaxTextExtent,"page=%lux%lu%+ld%+ld\n",
- (unsigned long) image->page.width,(unsigned long) image->page.height,
- (long) image->page.x,(long) image->page.y);
+ (void) FormatMagickString(buffer,MaxTextExtent,
+ "page=%.20gx%.20g%+.20g%+.20g\n",(double) image->page.width,(double)
+ image->page.height,(double) image->page.x,(double) image->page.y);
(void) WriteBlobString(image,buffer);
}
else
(GetPreviousImageInList(image) != (Image *) NULL))
{
if (image->scene == 0)
- (void) FormatMagickString(buffer,MaxTextExtent,"iterations=%lu "
- "delay=%lu ticks-per-second=%lu\n",(unsigned long)
- image->iterations,(unsigned long) image->delay,(unsigned long)
- image->ticks_per_second);
+ (void) FormatMagickString(buffer,MaxTextExtent,"iterations=%.20g "
+ "delay=%.20g ticks-per-second=%.20g\n",(double) image->iterations,
+ (double) image->delay,(double) image->ticks_per_second);
else
- (void) FormatMagickString(buffer,MaxTextExtent,"scene=%lu "
- "iterations=%lu delay=%lu ticks-per-second=%lu\n",(unsigned long)
- image->scene,(unsigned long) image->iterations,(unsigned long)
- image->delay,(unsigned long) image->ticks_per_second);
+ (void) FormatMagickString(buffer,MaxTextExtent,"scene=%.20g "
+ "iterations=%.20g delay=%.20g ticks-per-second=%.20g\n",(double)
+ image->scene,(double) image->iterations,(double) image->delay,
+ (double) image->ticks_per_second);
(void) WriteBlobString(image,buffer);
}
else
{
if (image->scene != 0)
{
- (void) FormatMagickString(buffer,MaxTextExtent,"scene=%lu\n",
- (unsigned long) image->scene);
+ (void) FormatMagickString(buffer,MaxTextExtent,"scene=%.20g\n",
+ (double) image->scene);
(void) WriteBlobString(image,buffer);
}
if (image->iterations != 0)
{
- (void) FormatMagickString(buffer,MaxTextExtent,"iterations=%lu\n",
- (unsigned long) image->iterations);
+ (void) FormatMagickString(buffer,MaxTextExtent,"iterations=%.20g\n",
+ (double) image->iterations);
(void) WriteBlobString(image,buffer);
}
if (image->delay != 0)
{
- (void) FormatMagickString(buffer,MaxTextExtent,"delay=%lu\n",
- (unsigned long) image->delay);
+ (void) FormatMagickString(buffer,MaxTextExtent,"delay=%.20g\n",
+ (double) image->delay);
(void) WriteBlobString(image,buffer);
}
if (image->ticks_per_second != UndefinedTicksPerSecond)
{
(void) FormatMagickString(buffer,MaxTextExtent,
- "ticks-per-second=%lu\n",(unsigned long) image->ticks_per_second);
+ "ticks-per-second=%.20g\n",(double) image->ticks_per_second);
(void) WriteBlobString(image,buffer);
}
}
profile=GetImageProfile(image,name);
if (profile != (StringInfo *) NULL)
{
- (void) FormatMagickString(buffer,MaxTextExtent,"profile:%s=%lu\n",
- name,(unsigned long) GetStringInfoLength(profile));
+ (void) FormatMagickString(buffer,MaxTextExtent,
+ "profile:%s=%.20g\n",name,(double)
+ GetStringInfoLength(profile));
(void) WriteBlobString(image,buffer);
}
name=GetNextImageProfile(image);
MAGICKCORE_QUANTUM_DEPTH);
(void) WriteBlobString(image,buffer);
(void) FormatMagickString(buffer,MaxTextExtent,
- "class=%s colors=%lu matte=%s\n",MagickOptionToMnemonic(
- MagickClassOptions,image->storage_class),(unsigned long) image->colors,
+ "class=%s colors=%.20g matte=%s\n",MagickOptionToMnemonic(
+ MagickClassOptions,image->storage_class),(double) image->colors,
MagickOptionToMnemonic(MagickBooleanOptions,(ssize_t) image->matte));
(void) WriteBlobString(image,buffer);
(void) FormatMagickString(buffer,MaxTextExtent,
- "columns=%lu rows=%lu depth=%lu\n",(unsigned long) image->columns,
- (unsigned long) image->rows,(unsigned long) image->depth);
+ "columns=%.20g rows=%.20g depth=%.20g\n",(double) image->columns,
+ (double) image->rows,(double) image->depth);
(void) WriteBlobString(image,buffer);
if (image->type != UndefinedType)
{
if (image->compression != UndefinedCompression)
{
(void) FormatMagickString(buffer,MaxTextExtent,
- "compression=%s quality=%lu\n",MagickOptionToMnemonic(
- MagickCompressOptions,image->compression),(unsigned long)
- image->quality);
+ "compression=%s quality=%.20g\n",MagickOptionToMnemonic(
+ MagickCompressOptions,image->compression),(double) image->quality);
(void) WriteBlobString(image,buffer);
}
if (image->units != UndefinedResolution)
}
if ((image->page.width != 0) || (image->page.height != 0))
{
- (void) FormatMagickString(buffer,MaxTextExtent,"page=%lux%lu%+ld%+ld\n",
- (unsigned long) image->page.width,(unsigned long) image->page.height,
- (long) image->page.x,(long) image->page.y);
+ (void) FormatMagickString(buffer,MaxTextExtent,
+ "page=%.20gx%.20g%+.20g%+.20g\n",(double) image->page.width,(double)
+ image->page.height,(double) image->page.x,(double) image->page.y);
(void) WriteBlobString(image,buffer);
}
else
{
if (image->scene == 0)
(void) FormatMagickString(buffer,MaxTextExtent,
- "iterations=%lu delay=%lu ticks-per-second=%lu\n",(long)
- image->iterations,(long) image->delay,(long)
+ "iterations=%.20g delay=%.20g ticks-per-second=%.20g\n",(double)
+ image->iterations,(double) image->delay,(double)
image->ticks_per_second);
else
(void) FormatMagickString(buffer,MaxTextExtent,
- "scene=%lu iterations=%lu delay=%lu ticks-per-second=%lu\n",
- (long) image->scene,(long) image->iterations,(long) image->delay,
- (long) image->ticks_per_second);
+ "scene=%.20g iterations=%.20g delay=%.20g ticks-per-second=%.20g\n",
+ (double) image->scene,(double) image->iterations,(double)
+ image->delay,(double) image->ticks_per_second);
(void) WriteBlobString(image,buffer);
}
else
{
if (image->scene != 0)
{
- (void) FormatMagickString(buffer,MaxTextExtent,"scene=%lu\n",
- (unsigned long) image->scene);
+ (void) FormatMagickString(buffer,MaxTextExtent,"scene=%.20g\n",
+ (double) image->scene);
(void) WriteBlobString(image,buffer);
}
if (image->iterations != 0)
{
- (void) FormatMagickString(buffer,MaxTextExtent,"iterations=%lu\n",
- (unsigned long) image->iterations);
+ (void) FormatMagickString(buffer,MaxTextExtent,"iterations=%.20g\n",
+ (double) image->iterations);
(void) WriteBlobString(image,buffer);
}
if (image->delay != 0)
{
- (void) FormatMagickString(buffer,MaxTextExtent,"delay=%lu\n",
- (unsigned long) image->delay);
+ (void) FormatMagickString(buffer,MaxTextExtent,"delay=%.20g\n",
+ (double) image->delay);
(void) WriteBlobString(image,buffer);
}
if (image->ticks_per_second != UndefinedTicksPerSecond)
{
(void) FormatMagickString(buffer,MaxTextExtent,
- "ticks-per-second=%lu\n",(unsigned long) image->ticks_per_second);
+ "ticks-per-second=%.20g\n",(double) image->ticks_per_second);
(void) WriteBlobString(image,buffer);
}
}
profile=GetImageProfile(image,name);
if (profile != (StringInfo *) NULL)
{
- (void) FormatMagickString(buffer,MaxTextExtent,"profile:%s=%lu\n",
- name,(unsigned long) GetStringInfoLength(profile));
+ (void) FormatMagickString(buffer,MaxTextExtent,
+ "profile:%s=%.20g\n",name,(double)
+ GetStringInfoLength(profile));
(void) WriteBlobString(image,buffer);
}
name=GetNextImageProfile(image);
Image
*frame;
- (void) FormatMagickString(p->filename,MaxTextExtent,"%s%lu.%s",
- basename,(unsigned long) p->scene,WriteMPEGIntermediateFormat);
- (void) FormatMagickString(filename,MaxTextExtent,"%s%lu.%s",
- basename,(unsigned long) p->scene,WriteMPEGIntermediateFormat);
+ (void) FormatMagickString(p->filename,MaxTextExtent,"%s%.20g.%s",
+ basename,(double) p->scene,WriteMPEGIntermediateFormat);
+ (void) FormatMagickString(filename,MaxTextExtent,"%s%.20g.%s",
+ basename,(double) p->scene,WriteMPEGIntermediateFormat);
(void) FormatMagickString(previous_image,MaxTextExtent,
- "%s%lu.%s",basename,(unsigned long) p->scene,
+ "%s%.20g.%s",basename,(double) p->scene,
WriteMPEGIntermediateFormat);
frame=CloneImage(p,0,0,MagickTrue,&p->exception);
if (frame == (Image *) NULL)
}
default:
{
- (void) FormatMagickString(filename,MaxTextExtent,"%s%lu.%s",
- basename,(unsigned long) p->scene,WriteMPEGIntermediateFormat);
+ (void) FormatMagickString(filename,MaxTextExtent,"%s%.20g.%s",
+ basename,(double) p->scene,WriteMPEGIntermediateFormat);
if (length > 0)
status=BlobToFile(filename,blob,length,&image->exception);
break;
{
if (status != MagickFalse)
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
- "%lu. Wrote %s file for scene %lu:",(unsigned long) i,
- WriteMPEGIntermediateFormat,(unsigned long) p->scene);
+ "%.20g. Wrote %s file for scene %.20g:",(double) i,
+ WriteMPEGIntermediateFormat,(double) p->scene);
else
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
- "%lu. Failed to write %s file for scene %lu:",(unsigned long) i,
- WriteMPEGIntermediateFormat,(unsigned long) p->scene);
- (void) LogMagickEvent(CoderEvent,GetMagickModule(),"%s",
- filename);
+ "%.20g. Failed to write %s file for scene %.20g:",(double) i,
+ WriteMPEGIntermediateFormat,(double) p->scene);
+ (void) LogMagickEvent(CoderEvent,GetMagickModule(),"%s",filename);
}
}
p->scene=scene;
delay=100.0*p->delay/MagickMax(1.0*p->ticks_per_second,1.0);
for (i=0; i < (ssize_t) MagickMax((1.0*delay+1.0)/3.0,1.0); i++)
{
- (void) FormatMagickString(p->filename,MaxTextExtent,"%s%lu.%s",
- basename,(unsigned long) count++,WriteMPEGIntermediateFormat);
+ (void) FormatMagickString(p->filename,MaxTextExtent,"%s%.20g.%s",
+ basename,(double) count++,WriteMPEGIntermediateFormat);
(void) RelinquishUniqueFileResource(p->filename);
}
(void) CopyMagickString(p->filename,image_info->filename,MaxTextExtent);
}
}
}
- (void) FormatMagickString(text,MaxTextExtent,"%lux%lu%+ld%+ld",
- (unsigned long) geometry.width,(unsigned long) geometry.height,
- (long) geometry.x,(long) geometry.y);
+ (void) FormatMagickString(text,MaxTextExtent,
+ "%.20gx%.20g%+.20g%+.20g",(double) geometry.width,(double)
+ geometry.height,(double) geometry.x,(double) geometry.y);
CloneString(&draw_info->geometry,text);
draw_info->affine.sx=current.sx*affine.sx+current.ry*affine.rx;
draw_info->affine.rx=current.rx*affine.sx+current.sy*affine.rx;
}
image=msl_info->image[n];
(void) FormatMagickString(composite_geometry,MaxTextExtent,
- "%lux%lu%+ld%+ld",(unsigned long) composite_image->columns,
- (unsigned long) composite_image->rows,(long) geometry.x,(long)
+ "%.20gx%.20g%+.20g%+.20g",(double) composite_image->columns,
+ (double) composite_image->rows,(double) geometry.x,(double)
geometry.y);
flags=ParseGravityGeometry(image,composite_geometry,&geometry,
&exception);
}
}
}
- (void) FormatMagickString(text,MaxTextExtent,"%lux%lu%+ld%+ld",
- (unsigned long) geometry.width,(unsigned long) geometry.height,
- (long) geometry.x,(long) geometry.y);
+ (void) FormatMagickString(text,MaxTextExtent,
+ "%.20gx%.20g%+.20g%+.20g",(double) geometry.width,(double)
+ geometry.height,(double) geometry.x,(double) geometry.y);
CloneString(&draw_info->geometry,text);
draw_info->affine.sx=current.sx*affine.sx+current.ry*affine.rx;
draw_info->affine.rx=current.rx*affine.sx+current.sy*affine.rx;
{
if (LocaleCompare(keyword,"height") == 0)
{
- (void) FormatMagickString(value,MaxTextExtent,"%lu",
- (unsigned long) msl_info->image[n]->rows);
+ (void) FormatMagickString(value,MaxTextExtent,"%.20g",
+ (double) msl_info->image[n]->rows);
(void) SetImageProperty(msl_info->attributes[n],key,value);
break;
}
{
if (LocaleCompare(keyword,"width") == 0)
{
- (void) FormatMagickString(value,MaxTextExtent,"%lu",
- (unsigned long) msl_info->image[n]->columns);
+ (void) FormatMagickString(value,MaxTextExtent,"%.20g",
+ (double) msl_info->image[n]->columns);
(void) SetImageProperty(msl_info->attributes[n],key,value);
break;
}
}
}
}
- (void) FormatMagickString(text,MaxTextExtent,"%lux%lu%+ld%+ld",
- (unsigned long) geometry.width,(unsigned long) geometry.height,
- (long) geometry.x,(long) geometry.y);
+ (void) FormatMagickString(text,MaxTextExtent,
+ "%.20gx%.20g%+.20g%+.20g",(double) geometry.width,(double)
+ geometry.height,(double) geometry.x,(double) geometry.y);
CloneString(&draw_info->geometry,text);
draw_info->affine.sx=current.sx*affine.sx+current.ry*affine.rx;
draw_info->affine.rx=current.rx*affine.sx+current.sy*affine.rx;
if (image_option != (const char *) NULL)
flags=ParseAbsoluteGeometry(image_option,&geometry);
flags=ParseAbsoluteGeometry(value,&geometry);
- (void) FormatMagickString(page,MaxTextExtent,"%lux%lu",
- (unsigned long) geometry.width,(unsigned long)
- geometry.height);
+ (void) FormatMagickString(page,MaxTextExtent,"%.20gx%.20g",
+ (double) geometry.width,(double) geometry.height);
if (((flags & XValue) != 0) || ((flags & YValue) != 0))
(void) FormatMagickString(page,MaxTextExtent,
- "%lux%lu%+ld%+ld",(unsigned long) geometry.width,
- (unsigned long) geometry.height,(long) geometry.x,(long)
+ "%.20gx%.20g%+.20g%+.20g",(double) geometry.width,
+ (double) geometry.height,(double) geometry.x,(double)
geometry.y);
(void) SetImageOption(msl_info->image_info[n],keyword,page);
msl_info->image_info[n]->page=GetPageGeometry(page);
/*
Initialize raster file header.
*/
- (void) FormatMagickString(buffer,MaxTextExtent,"%lu %lu\n",
- (unsigned long) image->columns,(unsigned long) image->rows);
+ (void) FormatMagickString(buffer,MaxTextExtent,"%.20g %.20g\n",(double)
+ image->columns,(double) image->rows);
(void) WriteBlobString(image,buffer);
for (y=0; y < (ssize_t) image->rows; y++)
{
(void) ParseAbsoluteGeometry(PSPageGeometry,&page);
if (image_info->page != (char *) NULL)
(void) ParseAbsoluteGeometry(image_info->page,&page);
- (void) FormatMagickString(geometry,MaxTextExtent,"%lux%lu",
- (unsigned long) page.width,(unsigned long) page.height);
+ (void) FormatMagickString(geometry,MaxTextExtent,"%.20gx%.20g",(double)
+ page.width,(double) page.height);
if (image_info->monochrome != MagickFalse)
delegate_info=GetDelegateInfo("pcl:mono",(char *) NULL,exception);
else
page.width=(size_t) floor(page.width*image->x_resolution/delta.x+0.5);
page.height=(size_t) floor(page.height*image->y_resolution/delta.y+
0.5);
- (void) FormatMagickString(options,MaxTextExtent,"-g%lux%lu ",
- (unsigned long) page.width,(unsigned long) page.height);
+ (void) FormatMagickString(options,MaxTextExtent,"-g%.20gx%.20g ",(double)
+ page.width,(double) page.height);
image=DestroyImage(image);
read_info=CloneImageInfo(image_info);
*read_info->magick='\0';
if (read_info->number_scenes != 0)
{
if (read_info->number_scenes != 1)
- (void) FormatMagickString(options,MaxTextExtent,"-dLastPage=%lu",
- (unsigned long) (read_info->scene+read_info->number_scenes));
+ (void) FormatMagickString(options,MaxTextExtent,"-dLastPage=%.20g",
+ (double) (read_info->scene+read_info->number_scenes));
else
(void) FormatMagickString(options,MaxTextExtent,
- "-dFirstPage=%lu -dLastPage=%lu",(unsigned long) read_info->scene+1,
- (unsigned long) (read_info->scene+read_info->number_scenes));
+ "-dFirstPage=%.20g -dLastPage=%.20g",(double) read_info->scene+1,
+ (double) (read_info->scene+read_info->number_scenes));
read_info->number_scenes=0;
if (read_info->scenes != (char *) NULL)
*read_info->scenes='\0';
*/
(void) WriteBlobString(image,"\033E"); /* printer reset */
(void) WriteBlobString(image,"\033*r3F"); /* set presentation mode */
- (void) FormatMagickString(buffer,MaxTextExtent,"\033*r%lus%luT",
- (unsigned long) image->columns,(unsigned long) image->rows);
+ (void) FormatMagickString(buffer,MaxTextExtent,"\033*r%.20gs%.20gT",
+ (double) image->columns,(double) image->rows);
(void) WriteBlobString(image,buffer);
- (void) FormatMagickString(buffer,MaxTextExtent,"\033*t%ldR",(long) density);
+ (void) FormatMagickString(buffer,MaxTextExtent,"\033*t%.20gR",(double)
+ density);
(void) WriteBlobString(image,buffer);
(void) WriteBlobString(image,"\033&l0E"); /* top margin 0 */
if (IsMonochromeImage(image,&image->exception) != MagickFalse)
for (i=0; i < (ssize_t) image->colors; i++)
{
(void) FormatMagickString(buffer,MaxTextExtent,
- "\033*v%da%db%dc%ldI",ScaleQuantumToChar(image->colormap[i].red),
+ "\033*v%da%db%dc%.20gI",
+ ScaleQuantumToChar(image->colormap[i].red),
ScaleQuantumToChar(image->colormap[i].green),
- ScaleQuantumToChar(image->colormap[i].blue),(long) i);
+ ScaleQuantumToChar(image->colormap[i].blue),(double) i);
(void) WriteBlobString(image,buffer);
}
for ( ; i < (1L << bits_per_pixel); i++)
{
- (void) FormatMagickString(buffer,MaxTextExtent,"\033*v%luI",
- (unsigned long) i);
+ (void) FormatMagickString(buffer,MaxTextExtent,"\033*v%.20gI",
+ (double) i);
(void) WriteBlobString(image,buffer);
}
}
{
case NoCompression:
{
- (void) FormatMagickString(buffer,MaxTextExtent,"\033*b%luW",
- (unsigned long) length);
+ (void) FormatMagickString(buffer,MaxTextExtent,"\033*b%.20gW",
+ (double) length);
(void) WriteBlobString(image,buffer);
(void) WriteBlob(image,length,pixels);
break;
{
packets=PCLPackbitsCompressImage(length,pixels,
compress_pixels);
- (void) FormatMagickString(buffer,MaxTextExtent,"\033*b%luW",
- (unsigned long) packets);
+ (void) FormatMagickString(buffer,MaxTextExtent,"\033*b%.20gW",
+ (double) packets);
(void) WriteBlobString(image,buffer);
(void) WriteBlob(image,packets,compress_pixels);
break;
previous_pixels[i]=(~pixels[i]);
packets=PCLDeltaCompressImage(length,previous_pixels,pixels,
compress_pixels);
- (void) FormatMagickString(buffer,MaxTextExtent,"\033*b%luW",
- (unsigned long) packets);
+ (void) FormatMagickString(buffer,MaxTextExtent,"\033*b%.20gW",
+ (double) packets);
(void) WriteBlobString(image,buffer);
(void) WriteBlob(image,packets,compress_pixels);
(void) CopyMagickMemory(previous_pixels,pixels,length*
/*
Note spot names.
*/
- (void) FormatMagickString(property,MaxTextExtent,"pdf:SpotColor-%lu",
- (unsigned long) spotcolor++);
+ (void) FormatMagickString(property,MaxTextExtent,"pdf:SpotColor-%.20g",
+ (double) spotcolor++);
i=0;
for (c=ReadBlobByte(image); c != EOF; c=ReadBlobByte(image))
{
0.5);
page.height=(size_t) floor(page.height*image->y_resolution/delta.y+
0.5);
- (void) FormatMagickString(options,MaxTextExtent,"-g%lux%lu ",
- (unsigned long) page.width,(unsigned long) page.height);
+ (void) FormatMagickString(options,MaxTextExtent,"-g%.20gx%.20g ",
+ (double) page.width,(double) page.height);
}
if (cmyk != MagickFalse)
(void) ConcatenateMagickString(options,"-dUseCIEColor ",MaxTextExtent);
char
pages[MaxTextExtent];
- (void) FormatMagickString(pages,MaxTextExtent,"-dFirstPage=%lu "
- "-dLastPage=%lu",(unsigned long) read_info->scene+1,(unsigned long)
+ (void) FormatMagickString(pages,MaxTextExtent,"-dFirstPage=%.20g "
+ "-dLastPage=%.20g",(double) read_info->scene+1,(double)
(read_info->scene+read_info->number_scenes));
(void) ConcatenateMagickString(options,pages,MaxTextExtent);
read_info->number_scenes=0;
version=(size_t) MagickMax(version,4);
if (LocaleCompare(image_info->magick,"PDFA") == 0)
version=(size_t) MagickMax(version,6);
- (void) FormatMagickString(buffer,MaxTextExtent,"%%PDF-1.%lu \n",
- (unsigned long) version);
+ (void) FormatMagickString(buffer,MaxTextExtent,"%%PDF-1.%.20g \n",
+ (double) version);
(void) WriteBlobString(image,buffer);
if (LocaleCompare(image_info->magick,"PDFA") == 0)
(void) WriteBlobString(image,"%âãÏÓ\n");
*/
xref[object++]=TellBlob(image);
root_id=object;
- (void) FormatMagickString(buffer,MaxTextExtent,"%lu 0 obj\n",
- (unsigned long) object);
+ (void) FormatMagickString(buffer,MaxTextExtent,"%.20g 0 obj\n",(double)
+ object);
(void) WriteBlobString(image,buffer);
(void) WriteBlobString(image,"<<\n");
if (LocaleCompare(image_info->magick,"PDFA") != 0)
- (void) FormatMagickString(buffer,MaxTextExtent,"/Pages %lu 0 R\n",
- (unsigned long) object+1);
+ (void) FormatMagickString(buffer,MaxTextExtent,"/Pages %.20g 0 R\n",
+ (double) object+1);
else
{
- (void) FormatMagickString(buffer,MaxTextExtent,"/Metadata %lu 0 R\n",
- (unsigned long) object+1);
+ (void) FormatMagickString(buffer,MaxTextExtent,"/Metadata %.20g 0 R\n",
+ (double) object+1);
(void) WriteBlobString(image,buffer);
- (void) FormatMagickString(buffer,MaxTextExtent,"/Pages %lu 0 R\n",
- (unsigned long) object+2);
+ (void) FormatMagickString(buffer,MaxTextExtent,"/Pages %.20g 0 R\n",
+ (double) object+2);
}
(void) WriteBlobString(image,buffer);
(void) WriteBlobString(image,"/Type /Catalog\n");
Write XMP object.
*/
xref[object++]=TellBlob(image);
- (void) FormatMagickString(buffer,MaxTextExtent,"%lu 0 obj\n",
- (unsigned long) object);
+ (void) FormatMagickString(buffer,MaxTextExtent,"%.20g 0 obj\n",
+ (double) object);
(void) WriteBlobString(image,buffer);
(void) WriteBlobString(image,"<<\n");
(void) WriteBlobString(image,"/Subtype /XML\n");
i=FormatMagickString(xmp_profile,MaxTextExtent,XMPProfile,
XMPProfileMagick,modify_date,create_date,timestamp,
GetMagickVersion(&version),GetMagickVersion(&version));
- (void) FormatMagickString(buffer,MaxTextExtent,"/Length %lu\n",1UL*i);
+ (void) FormatMagickString(buffer,MaxTextExtent,"/Length %.20g\n",
+ (double) i);
(void) WriteBlobString(image,buffer);
(void) WriteBlobString(image,"/Type /Metadata\n");
(void) WriteBlobString(image,">>\nstream\n");
*/
xref[object++]=TellBlob(image);
pages_id=object;
- (void) FormatMagickString(buffer,MaxTextExtent,"%lu 0 obj\n",(unsigned long)
+ (void) FormatMagickString(buffer,MaxTextExtent,"%.20g 0 obj\n",(double)
object);
(void) WriteBlobString(image,buffer);
(void) WriteBlobString(image,"<<\n");
(void) WriteBlobString(image,"/Type /Pages\n");
- (void) FormatMagickString(buffer,MaxTextExtent,"/Kids [ %lu 0 R ",
- (unsigned long) object+1);
+ (void) FormatMagickString(buffer,MaxTextExtent,"/Kids [ %.20g 0 R ",
+ (double) object+1);
(void) WriteBlobString(image,buffer);
count=(ssize_t) (pages_id+ObjectsPerImage+1);
if (image_info->adjoin != MagickFalse)
kid_image=image;
for ( ; GetNextImageInList(kid_image) != (Image *) NULL; count+=ObjectsPerImage)
{
- (void) FormatMagickString(buffer,MaxTextExtent,"%ld 0 R ",(long) count);
+ (void) FormatMagickString(buffer,MaxTextExtent,"%.20g 0 R ",(double)
+ count);
(void) WriteBlobString(image,buffer);
kid_image=GetNextImageInList(kid_image);
}
ThrowWriterException(ResourceLimitError,"MemoryAllocationFailed");
}
(void) WriteBlobString(image,"]\n");
- (void) FormatMagickString(buffer,MaxTextExtent,"/Count %lu\n",
- (unsigned long) ((count-pages_id)/ObjectsPerImage));
+ (void) FormatMagickString(buffer,MaxTextExtent,"/Count %.20g\n",
+ (double) ((count-pages_id)/ObjectsPerImage));
(void) WriteBlobString(image,buffer);
(void) WriteBlobString(image,">>\n");
(void) WriteBlobString(image,"endobj\n");
resolution.y=(size_t) (100.0*2.54*resolution.y+0.5)/100.0;
}
SetGeometry(image,&geometry);
- (void) FormatMagickString(page_geometry,MaxTextExtent,"%lux%lu",
- (unsigned long) image->columns,(unsigned long) image->rows);
+ (void) FormatMagickString(page_geometry,MaxTextExtent,"%.20gx%.20g",
+ (double) image->columns,(double) image->rows);
if (image_info->page != (char *) NULL)
(void) CopyMagickString(page_geometry,image_info->page,MaxTextExtent);
else
if ((image->page.width != 0) && (image->page.height != 0))
- (void) FormatMagickString(page_geometry,MaxTextExtent,"%lux%lu%+ld%+ld",
- (unsigned long) image->page.width,(unsigned long) image->page.height,
- (long) image->page.x,(long) image->page.y);
+ (void) FormatMagickString(page_geometry,MaxTextExtent,
+ "%.20gx%.20g%+.20g%+.20g",(double) image->page.width,
+ (double) image->page.height,(double) image->page.x,(double)
+ image->page.y);
else
if ((image->gravity != UndefinedGravity) &&
(LocaleCompare(image_info->magick,"PDF") == 0))
Write Page object.
*/
xref[object++]=TellBlob(image);
- (void) FormatMagickString(buffer,MaxTextExtent,"%lu 0 obj\n",(unsigned long)
+ (void) FormatMagickString(buffer,MaxTextExtent,"%.20g 0 obj\n",(double)
object);
(void) WriteBlobString(image,buffer);
(void) WriteBlobString(image,"<<\n");
(void) WriteBlobString(image,"/Type /Page\n");
- (void) FormatMagickString(buffer,MaxTextExtent,"/Parent %lu 0 R\n",
- (unsigned long) pages_id);
+ (void) FormatMagickString(buffer,MaxTextExtent,"/Parent %.20g 0 R\n",
+ (double) pages_id);
(void) WriteBlobString(image,buffer);
(void) WriteBlobString(image,"/Resources <<\n");
labels=(char **) NULL;
if (labels != (char **) NULL)
{
(void) FormatMagickString(buffer,MaxTextExtent,
- "/Font << /F%lu %lu 0 R >>\n",(unsigned long) image->scene,
- (unsigned long) object+4);
+ "/Font << /F%.20g %.20g 0 R >>\n",(double) image->scene,(double)
+ object+4);
(void) WriteBlobString(image,buffer);
}
(void) FormatMagickString(buffer,MaxTextExtent,
- "/XObject << /Im%lu %lu 0 R >>\n",(unsigned long) image->scene,
- (unsigned long) object+5);
+ "/XObject << /Im%.20g %.20g 0 R >>\n",(double) image->scene,(double)
+ object+5);
(void) WriteBlobString(image,buffer);
- (void) FormatMagickString(buffer,MaxTextExtent,"/ProcSet %lu 0 R >>\n",
- (unsigned long) object+3);
+ (void) FormatMagickString(buffer,MaxTextExtent,"/ProcSet %.20g 0 R >>\n",
+ (double) object+3);
(void) WriteBlobString(image,buffer);
(void) FormatMagickString(buffer,MaxTextExtent,
"/MediaBox [0 0 %g %g]\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",
- (unsigned long) object+1);
+ (void) FormatMagickString(buffer,MaxTextExtent,"/Contents %.20g 0 R\n",
+ (double) object+1);
(void) WriteBlobString(image,buffer);
- (void) FormatMagickString(buffer,MaxTextExtent,"/Thumb %lu 0 R\n",
- (unsigned long) object+8);
+ (void) FormatMagickString(buffer,MaxTextExtent,"/Thumb %.20g 0 R\n",
+ (double) object+8);
(void) WriteBlobString(image,buffer);
(void) WriteBlobString(image,">>\n");
(void) WriteBlobString(image,"endobj\n");
Write Contents object.
*/
xref[object++]=TellBlob(image);
- (void) FormatMagickString(buffer,MaxTextExtent,"%lu 0 obj\n",(unsigned long)
+ (void) FormatMagickString(buffer,MaxTextExtent,"%.20g 0 obj\n",(double)
object);
(void) WriteBlobString(image,buffer);
(void) WriteBlobString(image,"<<\n");
- (void) FormatMagickString(buffer,MaxTextExtent,"/Length %lu 0 R\n",
- (unsigned long) object+1);
+ (void) FormatMagickString(buffer,MaxTextExtent,"/Length %.20g 0 R\n",
+ (double) object+1);
(void) WriteBlobString(image,buffer);
(void) WriteBlobString(image,">>\n");
(void) WriteBlobString(image,"stream\n");
for (i=0; labels[i] != (char *) NULL; i++)
{
(void) WriteBlobString(image,"BT\n");
- (void) FormatMagickString(buffer,MaxTextExtent,"/F%lu %g Tf\n",
- (unsigned long) image->scene,pointsize);
+ (void) FormatMagickString(buffer,MaxTextExtent,"/F%.20g %g Tf\n",
+ (double) image->scene,pointsize);
(void) WriteBlobString(image,buffer);
- (void) FormatMagickString(buffer,MaxTextExtent,"%ld %ld Td\n",(long)
- geometry.x,(long) (geometry.y+geometry.height+i*pointsize+12));
+ (void) FormatMagickString(buffer,MaxTextExtent,"%.20g %.20g Td\n",
+ (double) geometry.x,(double) (geometry.y+geometry.height+i*pointsize+
+ 12));
(void) WriteBlobString(image,buffer);
(void) FormatMagickString(buffer,MaxTextExtent,"(%s) Tj\n",labels[i]);
(void) WriteBlobString(image,buffer);
(void) WriteBlobString(image,"ET\n");
labels[i]=DestroyString(labels[i]);
}
- (void) FormatMagickString(buffer,MaxTextExtent,"%g 0 0 %g %ld %ld cm\n",
- scale.x,scale.y,(long) geometry.x,(long) geometry.y);
+ (void) FormatMagickString(buffer,MaxTextExtent,"%g 0 0 %g %.20g %.20g cm\n",
+ scale.x,scale.y,(double) geometry.x,(double) geometry.y);
(void) WriteBlobString(image,buffer);
- (void) FormatMagickString(buffer,MaxTextExtent,"/Im%lu Do\n",
- (unsigned long) image->scene);
+ (void) FormatMagickString(buffer,MaxTextExtent,"/Im%.20g Do\n",
+ (double) image->scene);
(void) WriteBlobString(image,buffer);
(void) WriteBlobString(image,"Q\n");
offset=TellBlob(image)-offset;
Write Length object.
*/
xref[object++]=TellBlob(image);
- (void) FormatMagickString(buffer,MaxTextExtent,"%lu 0 obj\n",(unsigned long)
+ (void) FormatMagickString(buffer,MaxTextExtent,"%.20g 0 obj\n",(double)
object);
(void) WriteBlobString(image,buffer);
- (void) FormatMagickString(buffer,MaxTextExtent,"%lu\n",
- (unsigned long) offset);
+ (void) FormatMagickString(buffer,MaxTextExtent,"%.20g\n",(double) offset);
(void) WriteBlobString(image,buffer);
(void) WriteBlobString(image,"endobj\n");
/*
Write Procset object.
*/
xref[object++]=TellBlob(image);
- (void) FormatMagickString(buffer,MaxTextExtent,"%lu 0 obj\n",
- (unsigned long) object);
+ (void) FormatMagickString(buffer,MaxTextExtent,"%.20g 0 obj\n",
+ (double) object);
(void) WriteBlobString(image,buffer);
if ((image->storage_class == DirectClass) || (image->colors > 256))
(void) CopyMagickString(buffer,"[ /PDF /Text /ImageC",MaxTextExtent);
Write Font object.
*/
xref[object++]=TellBlob(image);
- (void) FormatMagickString(buffer,MaxTextExtent,"%lu 0 obj\n",
- (unsigned long) object);
+ (void) FormatMagickString(buffer,MaxTextExtent,"%.20g 0 obj\n",
+ (double) object);
(void) WriteBlobString(image,buffer);
(void) WriteBlobString(image,"<<\n");
if (labels != (char **) NULL)
{
(void) WriteBlobString(image,"/Type /Font\n");
(void) WriteBlobString(image,"/Subtype /Type1\n");
- (void) FormatMagickString(buffer,MaxTextExtent,"/Name /F%lu\n",
- (unsigned long) image->scene);
+ (void) FormatMagickString(buffer,MaxTextExtent,"/Name /F%.20g\n",
+ (double) image->scene);
(void) WriteBlobString(image,buffer);
(void) WriteBlobString(image,"/BaseFont /Helvetica\n");
(void) WriteBlobString(image,"/Encoding /MacRomanEncoding\n");
Write XObject object.
*/
xref[object++]=TellBlob(image);
- (void) FormatMagickString(buffer,MaxTextExtent,"%lu 0 obj\n",(unsigned long)
+ (void) FormatMagickString(buffer,MaxTextExtent,"%.20g 0 obj\n",(double)
object);
(void) WriteBlobString(image,buffer);
(void) WriteBlobString(image,"<<\n");
(void) WriteBlobString(image,"/Type /XObject\n");
(void) WriteBlobString(image,"/Subtype /Image\n");
- (void) FormatMagickString(buffer,MaxTextExtent,"/Name /Im%lu\n",
- (unsigned long) image->scene);
+ (void) FormatMagickString(buffer,MaxTextExtent,"/Name /Im%.20g\n",
+ (double) image->scene);
(void) WriteBlobString(image,buffer);
switch (compression)
{
MaxTextExtent);
(void) WriteBlobString(image,buffer);
(void) FormatMagickString(buffer,MaxTextExtent,"/DecodeParms [ << "
- "/K %s /BlackIs1 false /Columns %ld /Rows %ld >> ]\n",CCITTParam,
- (unsigned long) image->columns,(unsigned long) image->rows);
+ "/K %s /BlackIs1 false /Columns %.20g /Rows %.20g >> ]\n",CCITTParam,
+ (double) image->columns,(double) image->rows);
break;
}
default:
}
}
(void) WriteBlobString(image,buffer);
- (void) FormatMagickString(buffer,MaxTextExtent,"/Width %lu\n",
- (unsigned long) image->columns);
+ (void) FormatMagickString(buffer,MaxTextExtent,"/Width %.20g\n",(double)
+ image->columns);
(void) WriteBlobString(image,buffer);
- (void) FormatMagickString(buffer,MaxTextExtent,"/Height %lu\n",
- (unsigned long) image->rows);
+ (void) FormatMagickString(buffer,MaxTextExtent,"/Height %.20g\n",(double)
+ image->rows);
(void) WriteBlobString(image,buffer);
- (void) FormatMagickString(buffer,MaxTextExtent,"/ColorSpace %lu 0 R\n",
- (unsigned long) object+2);
+ (void) FormatMagickString(buffer,MaxTextExtent,"/ColorSpace %.20g 0 R\n",
+ (double) object+2);
(void) WriteBlobString(image,buffer);
(void) FormatMagickString(buffer,MaxTextExtent,"/BitsPerComponent %d\n",
(compression == FaxCompression) || (compression == Group4Compression) ?
(void) WriteBlobString(image,buffer);
if (image->matte != MagickFalse)
{
- (void) FormatMagickString(buffer,MaxTextExtent,"/SMask %lu 0 R\n",
- (unsigned long) object+7);
+ (void) FormatMagickString(buffer,MaxTextExtent,"/SMask %.20g 0 R\n",
+ (double) object+7);
(void) WriteBlobString(image,buffer);
}
- (void) FormatMagickString(buffer,MaxTextExtent,"/Length %lu 0 R\n",
- (unsigned long) object+1);
+ (void) FormatMagickString(buffer,MaxTextExtent,"/Length %.20g 0 R\n",
+ (double) object+1);
(void) WriteBlobString(image,buffer);
(void) WriteBlobString(image,">>\n");
(void) WriteBlobString(image,"stream\n");
Write Length object.
*/
xref[object++]=TellBlob(image);
- (void) FormatMagickString(buffer,MaxTextExtent,"%lu 0 obj\n",(unsigned long)
+ (void) FormatMagickString(buffer,MaxTextExtent,"%.20g 0 obj\n",(double)
object);
(void) WriteBlobString(image,buffer);
- (void) FormatMagickString(buffer,MaxTextExtent,"%lu\n",
- (unsigned long) offset);
+ (void) FormatMagickString(buffer,MaxTextExtent,"%.20g\n",
+ (double) offset);
(void) WriteBlobString(image,buffer);
(void) WriteBlobString(image,"endobj\n");
/*
Write Colorspace object.
*/
xref[object++]=TellBlob(image);
- (void) FormatMagickString(buffer,MaxTextExtent,"%lu 0 obj\n",(unsigned long)
+ (void) FormatMagickString(buffer,MaxTextExtent,"%.20g 0 obj\n",(double)
object);
(void) WriteBlobString(image,buffer);
if (image->colorspace == CMYKColorspace)
(void) CopyMagickString(buffer,"/DeviceRGB\n",MaxTextExtent);
else
(void) FormatMagickString(buffer,MaxTextExtent,
- "[ /Indexed /DeviceRGB %lu %lu 0 R ]\n",(unsigned long)
- image->colors-1,(unsigned long) object+3);
+ "[ /Indexed /DeviceRGB %.20g %.20g 0 R ]\n",(double) image->colors-
+ 1,(double) object+3);
(void) WriteBlobString(image,buffer);
(void) WriteBlobString(image,"endobj\n");
/*
if (tile_image == (Image *) NULL)
ThrowWriterException(ResourceLimitError,image->exception.reason);
xref[object++]=TellBlob(image);
- (void) FormatMagickString(buffer,MaxTextExtent,"%lu 0 obj\n",(unsigned long)
+ (void) FormatMagickString(buffer,MaxTextExtent,"%.20g 0 obj\n",(double)
object);
(void) WriteBlobString(image,buffer);
(void) WriteBlobString(image,"<<\n");
MaxTextExtent);
(void) WriteBlobString(image,buffer);
(void) FormatMagickString(buffer,MaxTextExtent,"/DecodeParms [ << "
- "/K %s /BlackIs1 false /Columns %lu /Rows %lu >> ]\n",CCITTParam,
- (unsigned long) tile_image->columns,(unsigned long) tile_image->rows);
+ "/K %s /BlackIs1 false /Columns %.20g /Rows %.20g >> ]\n",CCITTParam,
+ (double) tile_image->columns,(double) tile_image->rows);
break;
}
default:
}
}
(void) WriteBlobString(image,buffer);
- (void) FormatMagickString(buffer,MaxTextExtent,"/Width %lu\n",
- (unsigned long) tile_image->columns);
+ (void) FormatMagickString(buffer,MaxTextExtent,"/Width %.20g\n",(double)
+ tile_image->columns);
(void) WriteBlobString(image,buffer);
- (void) FormatMagickString(buffer,MaxTextExtent,"/Height %lu\n",
- (unsigned long) tile_image->rows);
+ (void) FormatMagickString(buffer,MaxTextExtent,"/Height %.20g\n",(double)
+ tile_image->rows);
(void) WriteBlobString(image,buffer);
- (void) FormatMagickString(buffer,MaxTextExtent,"/ColorSpace %lu 0 R\n",
- (unsigned long) object-1);
+ (void) FormatMagickString(buffer,MaxTextExtent,"/ColorSpace %.20g 0 R\n",
+ (double) object-1);
(void) WriteBlobString(image,buffer);
(void) FormatMagickString(buffer,MaxTextExtent,"/BitsPerComponent %d\n",
(compression == FaxCompression) || (compression == Group4Compression) ?
1 : 8);
(void) WriteBlobString(image,buffer);
- (void) FormatMagickString(buffer,MaxTextExtent,"/Length %lu 0 R\n",
- (unsigned long) object+1);
+ (void) FormatMagickString(buffer,MaxTextExtent,"/Length %.20g 0 R\n",
+ (double) object+1);
(void) WriteBlobString(image,buffer);
(void) WriteBlobString(image,">>\n");
(void) WriteBlobString(image,"stream\n");
Write Length object.
*/
xref[object++]=TellBlob(image);
- (void) FormatMagickString(buffer,MaxTextExtent,"%lu 0 obj\n",(unsigned long)
+ (void) FormatMagickString(buffer,MaxTextExtent,"%.20g 0 obj\n",(double)
object);
(void) WriteBlobString(image,buffer);
- (void) FormatMagickString(buffer,MaxTextExtent,"%lu\n",
- (unsigned long) offset);
+ (void) FormatMagickString(buffer,MaxTextExtent,"%.20g\n",(double) offset);
(void) WriteBlobString(image,buffer);
(void) WriteBlobString(image,"endobj\n");
xref[object++]=TellBlob(image);
- (void) FormatMagickString(buffer,MaxTextExtent,"%lu 0 obj\n",(unsigned long)
+ (void) FormatMagickString(buffer,MaxTextExtent,"%.20g 0 obj\n",(double)
object);
(void) WriteBlobString(image,buffer);
if ((image->storage_class != DirectClass) && (image->colors <= 256) &&
(void) WriteBlobString(image,"<<\n");
if (compression == NoCompression)
(void) WriteBlobString(image,"/Filter [ /ASCII85Decode ]\n");
- (void) FormatMagickString(buffer,MaxTextExtent,"/Length %lu 0 R\n",
- (unsigned long) object+1);
+ (void) FormatMagickString(buffer,MaxTextExtent,"/Length %.20g 0 R\n",
+ (double) object+1);
(void) WriteBlobString(image,buffer);
(void) WriteBlobString(image,">>\n");
(void) WriteBlobString(image,"stream\n");
Write Length object.
*/
xref[object++]=TellBlob(image);
- (void) FormatMagickString(buffer,MaxTextExtent,"%lu 0 obj\n",(unsigned long)
+ (void) FormatMagickString(buffer,MaxTextExtent,"%.20g 0 obj\n",(double)
object);
(void) WriteBlobString(image,buffer);
- (void) FormatMagickString(buffer,MaxTextExtent,"%lu\n",(unsigned long)
+ (void) FormatMagickString(buffer,MaxTextExtent,"%.20g\n",(double)
offset);
(void) WriteBlobString(image,buffer);
(void) WriteBlobString(image,"endobj\n");
Write softmask object.
*/
xref[object++]=TellBlob(image);
- (void) FormatMagickString(buffer,MaxTextExtent,"%lu 0 obj\n",(unsigned long)
+ (void) FormatMagickString(buffer,MaxTextExtent,"%.20g 0 obj\n",(double)
object);
(void) WriteBlobString(image,buffer);
(void) WriteBlobString(image,"<<\n");
{
(void) WriteBlobString(image,"/Type /XObject\n");
(void) WriteBlobString(image,"/Subtype /Image\n");
- (void) FormatMagickString(buffer,MaxTextExtent,"/Name /Ma%lu\n",
- (unsigned long) image->scene);
+ (void) FormatMagickString(buffer,MaxTextExtent,"/Name /Ma%.20g\n",
+ (double) image->scene);
(void) WriteBlobString(image,buffer);
switch (compression)
{
}
}
(void) WriteBlobString(image,buffer);
- (void) FormatMagickString(buffer,MaxTextExtent,"/Width %lu\n",
- (unsigned long) image->columns);
+ (void) FormatMagickString(buffer,MaxTextExtent,"/Width %.20g\n",
+ (double) image->columns);
(void) WriteBlobString(image,buffer);
- (void) FormatMagickString(buffer,MaxTextExtent,"/Height %lu\n",
- (unsigned long) image->rows);
+ (void) FormatMagickString(buffer,MaxTextExtent,"/Height %.20g\n",
+ (double) image->rows);
(void) WriteBlobString(image,buffer);
(void) WriteBlobString(image,"/ColorSpace /DeviceGray\n");
(void) FormatMagickString(buffer,MaxTextExtent,"/BitsPerComponent %d\n",
(compression == FaxCompression) || (compression == Group4Compression)
? 1 : 8);
(void) WriteBlobString(image,buffer);
- (void) FormatMagickString(buffer,MaxTextExtent,"/Length %lu 0 R\n",
- (unsigned long) object+1);
+ (void) FormatMagickString(buffer,MaxTextExtent,"/Length %.20g 0 R\n",
+ (double) object+1);
(void) WriteBlobString(image,buffer);
(void) WriteBlobString(image,">>\n");
(void) WriteBlobString(image,"stream\n");
Write Length object.
*/
xref[object++]=TellBlob(image);
- (void) FormatMagickString(buffer,MaxTextExtent,"%lu 0 obj\n",(unsigned long)
+ (void) FormatMagickString(buffer,MaxTextExtent,"%.20g 0 obj\n",(double)
object);
(void) WriteBlobString(image,buffer);
- (void) FormatMagickString(buffer,MaxTextExtent,"%lu\n",(unsigned long)
- offset);
+ (void) FormatMagickString(buffer,MaxTextExtent,"%.20g\n",(double) offset);
(void) WriteBlobString(image,buffer);
(void) WriteBlobString(image,"endobj\n");
if (GetNextImageInList(image) == (Image *) NULL)
*/
xref[object++]=TellBlob(image);
info_id=object;
- (void) FormatMagickString(buffer,MaxTextExtent,"%lu 0 obj\n",(unsigned long)
+ (void) FormatMagickString(buffer,MaxTextExtent,"%.20g 0 obj\n",(double)
object);
(void) WriteBlobString(image,buffer);
(void) WriteBlobString(image,"<<\n");
*/
offset=TellBlob(image)-xref[0]+10;
(void) WriteBlobString(image,"xref\n");
- (void) FormatMagickString(buffer,MaxTextExtent,"0 %lu\n",(unsigned long)
+ (void) FormatMagickString(buffer,MaxTextExtent,"0 %.20g\n",(double)
object+1);
(void) WriteBlobString(image,buffer);
(void) WriteBlobString(image,"0000000000 65535 f \n");
}
(void) WriteBlobString(image,"trailer\n");
(void) WriteBlobString(image,"<<\n");
- (void) FormatMagickString(buffer,MaxTextExtent,"/Size %lu\n",(unsigned long)
+ (void) FormatMagickString(buffer,MaxTextExtent,"/Size %.20g\n",(double)
object+1);
(void) WriteBlobString(image,buffer);
- (void) FormatMagickString(buffer,MaxTextExtent,"/Info %lu 0 R\n",
- (unsigned long) info_id);
+ (void) FormatMagickString(buffer,MaxTextExtent,"/Info %.20g 0 R\n",(double)
+ info_id);
(void) WriteBlobString(image,buffer);
- (void) FormatMagickString(buffer,MaxTextExtent,"/Root %lu 0 R\n",
- (unsigned long) root_id);
+ (void) FormatMagickString(buffer,MaxTextExtent,"/Root %.20g 0 R\n",(double)
+ root_id);
(void) WriteBlobString(image,buffer);
(void) WriteBlobString(image,">>\n");
(void) WriteBlobString(image,"startxref\n");
- (void) FormatMagickString(buffer,MaxTextExtent,"%lu\n",
- (unsigned long) offset);
+ (void) FormatMagickString(buffer,MaxTextExtent,"%.20g\n",(double) offset);
(void) WriteBlobString(image,buffer);
(void) WriteBlobString(image,"%%EOF\n");
xref=(MagickOffsetType *) RelinquishMagickMemory(xref);
read_info=DestroyImageInfo(read_info);
if (tile_image == (Image *) NULL)
continue;
- (void) FormatMagickString(geometry,MaxTextExtent,"%lux%lu",
- (unsigned long) MagickMax(image->columns,tile_image->columns),
- (unsigned long) MagickMax(image->rows,tile_image->rows));
+ (void) FormatMagickString(geometry,MaxTextExtent,"%.20gx%.20g",
+ (double) MagickMax(image->columns,tile_image->columns),
+ (double) MagickMax(image->rows,tile_image->rows));
(void) SetImageExtent(image,
MagickMax(image->columns,tile_image->columns),
MagickMax(image->rows,tile_image->rows));
assert(image->signature == MagickSignature);
if (image->debug != MagickFalse)
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
- " CompressColorMapTransFirst %s (%lu colors)",image->filename,
- (unsigned long) image->colors);
+ " CompressColorMapTransFirst %s (%.20g colors)",image->filename,
+ (double) image->colors);
if (image->storage_class != PseudoClass || image->colors > 256 ||
image->colors < 2)
{
{
if (logging != MagickFalse)
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
- " Writing %c%c%c%c chunk, length: %lu",
- type[0],type[1],type[2],type[3],(unsigned long) length);
+ " Writing %c%c%c%c chunk, length: %.20g",
+ type[0],type[1],type[2],type[3],(double) length);
}
#endif /* PNG_LIBPNG_VER > 10011 */
msg[MaxTextExtent];
(void) FormatMagickString(msg,MaxTextExtent,
- "Expected %lu bytes; found %lu bytes",(unsigned long) length,
- (unsigned long) check);
+ "Expected %.20g bytes; found %.20g bytes",(double) length,
+ (double) check);
png_warning(png_ptr,msg);
png_error(png_ptr,"Read Exception");
}
if (logging != MagickFalse)
{
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
- " PNG width: %lu, height: %lu",
- (unsigned long) ping_width, (unsigned long) ping_height);
+ " PNG width: %.20g, height: %.20g",
+ (double) ping_width, (double) ping_height);
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
" PNG color_type: %d, bit_depth: %d",
ping_color_type, ping_bit_depth);
if (logging != MagickFalse)
if (image->page.x || image->page.y)
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
- " Reading PNG oFFs chunk: x: %ld, y: %ld.",(long) image->page.x,
- (long) image->page.y);
+ " Reading PNG oFFs chunk: x: %.20g, y: %.20g.",(double)
+ image->page.x,(double) image->page.y);
}
#endif
#if defined(PNG_pHYs_SUPPORTED)
}
if (logging != MagickFalse)
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
- " Reading PNG pHYs chunk: xres: %lu, yres: %lu, units: %d.",
- (unsigned long) x_resolution,(unsigned long) y_resolution,unit_type);
+ " Reading PNG pHYs chunk: xres: %.20g, yres: %.20g, units: %d.",
+ (double) x_resolution,(double) y_resolution,unit_type);
}
#endif
if (png_get_valid(ping,ping_info,PNG_INFO_PLTE))
if (logging != MagickFalse)
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
- " image->background_color=(%d,%d,%d).",
- image->background_color.red,
- image->background_color.green,image->background_color.blue);
+ " image->background_color=(%.20g,%.20g,%.20g).",
+ (double) image->background_color.red,
+ (double) image->background_color.green,
+ (double) image->background_color.blue);
}
}
#endif
{
if (logging != MagickFalse)
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
- " Skipping PNG image data for scene %ld",(long)
+ " Skipping PNG image data for scene %.20g",(double)
mng_info->scenes_found-1);
png_destroy_read_struct(&ping,&ping_info,&end_info);
#if defined(PNG_SETJMP_NOT_THREAD_SAFE)
if (logging != MagickFalse)
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
- " Reading JNG chunk type %c%c%c%c, length: %lu",
- type[0],type[1],type[2],type[3],(unsigned long) length);
+ " Reading JNG chunk type %c%c%c%c, length: %.20g",
+ type[0],type[1],type[2],type[3],(double) length);
if (length > PNG_UINT_31_MAX || count == 0)
ThrowReaderException(CorruptImageError,"CorruptImage");
if (logging != MagickFalse)
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
- " Reading MNG chunk type %c%c%c%c, length: %lu",
- type[0],type[1],type[2],type[3],(unsigned long) length);
+ " Reading MNG chunk type %c%c%c%c, length: %.20g",
+ type[0],type[1],type[2],type[3],(double) length);
if (length > PNG_UINT_31_MAX)
status=MagickFalse;
if (logging != MagickFalse)
{
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
- " MNG width: %lu",(unsigned long) mng_info->mng_width);
+ " MNG width: %.20g",(double) mng_info->mng_width);
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
- " MNG height: %lu",(unsigned long) mng_info->mng_height);
+ " MNG height: %.20g",(double) mng_info->mng_height);
}
p+=8;
mng_info->ticks_per_second=(size_t) mng_get_long(p);
if ((mng_info->mng_width > 65535L) ||
(mng_info->mng_height > 65535L))
ThrowReaderException(ImageError,"WidthOrHeightExceedsLimit");
- (void) FormatMagickString(page_geometry,MaxTextExtent,"%lux%lu+0+0",
- (unsigned long) mng_info->mng_width,(unsigned long)
+ (void) FormatMagickString(page_geometry,MaxTextExtent,
+ "%.20gx%.20g+0+0",(double) mng_info->mng_width,(double)
mng_info->mng_height);
mng_info->frame.left=0;
mng_info->frame.right=(ssize_t) mng_info->mng_width;
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
" repeat=%d",repeat);
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
- " final_delay=%ld",(long) final_delay);
+ " final_delay=%.20g",(double) final_delay);
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
- " image->iterations=%ld",(long) image->iterations);
+ " image->iterations=%.20g",(double) image->iterations);
}
chunk=(unsigned char *) RelinquishMagickMemory(chunk);
continue;
if (logging != MagickFalse)
{
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
- " x_off[%d]: %lu",object_id,(unsigned long)
+ " x_off[%d]: %.20g",object_id,(double)
mng_info->x_off[object_id]);
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
- " y_off[%d]: %lu",object_id,(unsigned long)
+ " y_off[%d]: %.20g",object_id,(double)
mng_info->y_off[object_id]);
}
}
p+=4;
if (logging != MagickFalse)
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
- " Framing_delay=%ld",(long) frame_delay);
+ " Framing_delay=%.20g",(double) frame_delay);
}
if (change_timeout)
{
p+=4;
if (logging != MagickFalse)
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
- " Framing_timeout=%ld",(long) frame_timeout);
+ " Framing_timeout=%.20g",(double) frame_timeout);
}
if (change_clipping)
{
previous_fb=fb;
if (logging != MagickFalse)
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
- " Frame_clipping: L=%ld R=%ld T=%ld B=%ld",
- (long) fb.left,(long) fb.right,(long) fb.top,
- (long) fb.bottom);
+ " Frame_clipping: L=%.20g R=%.20g T=%.20g B=%.20g",
+ (double) fb.left,(double) fb.right,(double) fb.top,
+ (double) fb.bottom);
if (change_clipping == 2)
default_fb=fb;
}
#if defined(MNG_INSERT_LAYERS)
if (logging != MagickFalse)
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
- " subframe_width=%lu, subframe_height=%lu",(unsigned long)
- subframe_width,(unsigned long) subframe_height);
+ " subframe_width=%.20g, subframe_height=%.20g",(double)
+ subframe_width,(double) subframe_height);
if (insert_layers && (mng_info->framing_mode == 4) &&
(subframe_width) && (subframe_height))
{
(void) SetImageBackgroundColor(image);
if (logging != MagickFalse)
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
- " Inserted background layer, L=%ld, R=%ld, T=%ld, B=%ld",
- (long) mng_info->clip.left,(long) mng_info->clip.right,
- (long) mng_info->clip.top,(long) mng_info->clip.bottom);
+ " Inserted background layer, L=%.20g, R=%.20g T=%.20g, B=%.20g",
+ (double) mng_info->clip.left,(double) mng_info->clip.right,
+ (double) mng_info->clip.top,(double) mng_info->clip.bottom);
}
#endif
chunk=(unsigned char *) RelinquishMagickMemory(chunk);
loop_iters=mng_get_long(&chunk[1]);
if (logging != MagickFalse)
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
- " LOOP level %ld has %ld iterations ",(long) loop_level,
- (long) loop_iters);
+ " LOOP level %.20g has %.20g iterations ",(double) loop_level,
+ (double) loop_iters);
if (loop_iters == 0)
skipping_loop=loop_level;
else
mng_info->loop_iteration[loop_level]++;
if (logging != MagickFalse)
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
- " ENDL: LOOP level %ld has %ld remaining iterations ",
- (long) loop_level,(long)
+ " ENDL: LOOP level %.20g has %.20g remaining iterations ",
+ (double) loop_level,(double)
mng_info->loop_count[loop_level]);
if (mng_info->loop_count[loop_level] != 0)
{
(void) SetImageBackgroundColor(image);
if (logging != MagickFalse)
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
- " Inserted transparent background layer, W=%lud, H=%lud",
- (unsigned long) mng_info->mng_width,(unsigned long)
- mng_info->mng_height);
+ " Inserted transparent background layer, W=%.20g, H=%.20g",
+ (double) mng_info->mng_width,(double) mng_info->mng_height);
}
}
/*
(void) SetImageBackgroundColor(image);
if (logging != MagickFalse)
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
- " Inserted background layer, L=%ld, R=%ld, T=%ld, B=%ld",
- (long) mng_info->clip.left,(long) mng_info->clip.right,
- (long) mng_info->clip.top,(long) mng_info->clip.bottom);
+ " Inserted background layer, L=%.20g, R=%.20g T=%.20g, B=%.20g",
+ (double) mng_info->clip.left,(double) mng_info->clip.right,
+ (double) mng_info->clip.top,(double) mng_info->clip.bottom);
}
#endif /* MNG_INSERT_LAYERS */
first_mng_object=MagickFalse;
if (logging != MagickFalse)
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
- " Magnify the rows to %lu",(unsigned long)
- large_image->rows);
+ " Magnify the rows to %.20g",(double) large_image->rows);
m=(ssize_t) mng_info->magn_mt;
yy=0;
length=(size_t) image->columns;
/* magnify the columns */
if (logging != MagickFalse)
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
- " Magnify the columns to %lu",(unsigned long)
- image->columns);
+ " Magnify the columns to %.20g",(double) image->columns);
for (y=0; y < (ssize_t) image->rows; y++)
{
image->delay=final_delay;
if (logging != MagickFalse)
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
- " image->delay=%lu, final_delay=%lu",(unsigned long) image->delay,
- (unsigned long) final_delay);
+ " image->delay=%.20g, final_delay=%.20g",(double) image->delay,
+ (double) final_delay);
if (logging != MagickFalse)
{
int
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
" Before coalesce:");
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
- " scene 0 delay=%lu",(unsigned long) image->delay);
+ " scene 0 delay=%.20g",(double) image->delay);
while (GetNextImageInList(image) != (Image *) NULL)
{
image=GetNextImageInList(image);
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
- " scene %ld delay=%lu",(long) scene++,(unsigned long)
- image->delay);
+ " scene %.20g delay=%.20g",(double) scene++,(double) image->delay);
}
}
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
" After coalesce:");
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
- " scene 0 delay=%lu dispose=%ld",(unsigned long) image->delay,
- (long) image->dispose);
+ " scene 0 delay=%.20g dispose=%.20g",(double) image->delay,
+ (double) image->dispose);
while (GetNextImageInList(image) != (Image *) NULL)
{
image=GetNextImageInList(image);
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
- " scene %ld delay=%lu dispose=%ld",(long) scene++,
- (unsigned long) image->delay,(long) image->dispose);
+ " scene %.20g delay=%.20g dispose=%.20g",(double) scene++,
+ (double) image->delay,(double) image->dispose);
}
}
image=GetFirstImageInList(image);
if (image_info->verbose)
{
- (void) printf("writing raw profile: type=%s, length=%lu\n",
- (char *) profile_type, length);
+ (void) printf("writing raw profile: type=%s, length=%.20g\n",
+ (char *) profile_type, (double) length);
}
text=(png_textp) png_malloc(ping,(png_uint_32) sizeof(png_text));
description_length=(png_uint_32) strlen((const char *) profile_description);
if (logging != MagickFalse)
{
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
- " width=%lu",(unsigned long) ping_width);
+ " width=%.20g",(double) ping_width);
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
- " height=%lu",(unsigned long) ping_height);
+ " height=%.20g",(double) ping_height);
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
- " image_matte=%lu",(unsigned long) image->matte);
+ " image_matte=%.20g",(double) image->matte);
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
- " image_depth=%lu",(unsigned long) image->depth);
+ " image_depth=%.20g",(double) image->depth);
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
- " requested PNG image_depth=%lu",(unsigned long) image->depth);
+ " requested PNG image_depth=%.20g",(double) image->depth);
}
save_image_depth=image_depth;
ping_bit_depth=(png_byte) save_image_depth;
(void) SyncImage(image);
if (logging != MagickFalse)
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
- " Colors quantized to %ld",(unsigned long) number_colors);
+ " Colors quantized to %.20g",(double) number_colors);
}
if (matte)
png_set_invalid(ping,ping_info,PNG_INFO_tRNS);
if (logging != MagickFalse)
{
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
- " Number of colors: %lu",(unsigned long) image_colors);
+ " Number of colors: %.20g",(double) image_colors);
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
" Tentative PNG bit depth: %d",ping_bit_depth);
}
{
if (logging != MagickFalse)
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
- " Colors increased to %lu",(unsigned long)
+ " Colors increased to %.20g",(double)
image_colors);
}
}
if (logging != MagickFalse)
{
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
- " Tentative PNG color type: %d",ping_color_type);
+ " Tentative PNG color type: %.20g",(double) ping_color_type);
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
- " image_info->type: %d",image_info->type);
+ " image_info->type: %.20g",(double) image_info->type);
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
- " image_depth: %lu",(unsigned long) image_depth);
+ " image_depth: %.20g",(double) image_depth);
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
- " ping_bit_depth: %d",ping_bit_depth);
+ " ping_bit_depth: %.20g",(double) ping_bit_depth);
}
if (matte && (mng_info->optimize || mng_info->IsPalette))
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
" Writing PNG image data");
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
- " Allocating %lu bytes of memory for pixels",(unsigned long)
- rowbytes);
+ " Allocating %.20g bytes of memory for pixels",(double) rowbytes);
}
png_pixels=(unsigned char *) AcquireQuantumMemory(rowbytes,
sizeof(*png_pixels));
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
" Wrote PNG image data");
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
- " Width: %lu",(unsigned long) ping_width);
+ " Width: %.20g",(double) ping_width);
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
- " Height: %lu",(unsigned long) ping_height);
+ " Height: %.20g",(double) ping_height);
if (mng_info->write_png_depth)
{
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
jng_alpha_sample_depth=8;
if (logging != MagickFalse)
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
- " Successfully read jpeg_image into a blob, length=%lu.",
- (unsigned long) length);
+ " Successfully read jpeg_image into a blob, length=%.20g.",
+ (double) length);
}
/* Destroy JPEG image and image_info */
/* Write IDAT chunk header */
if (logging != MagickFalse)
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
- " Write IDAT chunks from blob, length=%lu.",(unsigned long)
+ " Write IDAT chunks from blob, length=%.20g.",(double)
length);
/* Copy IDAT chunks */
{
if (logging != MagickFalse)
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
- " Skipping %c%c%c%c chunk, length=%lu.",
- *(p),*(p+1),*(p+2),*(p+3),(unsigned long) len);
+ " Skipping %c%c%c%c chunk, length=%.20g.",
+ *(p),*(p+1),*(p+2),*(p+3),(double) len);
}
p+=(8+len);
}
/* Write JDAA chunk header */
if (logging != MagickFalse)
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
- " Write JDAA chunk, length=%lu.",(unsigned long) length);
+ " Write JDAA chunk, length=%.20g.",(double) length);
(void) WriteBlobMSBULong(image,(size_t) length);
PNGType(chunk,mng_JDAA);
LogPNGChunk((int) logging,mng_JDAA,length);
if (logging != MagickFalse)
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
- " Created jpeg_image, %lu x %lu.",(unsigned long) jpeg_image->columns,
- (unsigned long) jpeg_image->rows);
+ " Created jpeg_image, %.20g x %.20g.",(double) jpeg_image->columns,
+ (double) jpeg_image->rows);
if (jng_color_type == 8 || jng_color_type == 12)
jpeg_image_info->type=GrayscaleType;
if (logging != MagickFalse)
{
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
- " Successfully read jpeg_image into a blob, length=%lu.",
- (unsigned long) length);
+ " Successfully read jpeg_image into a blob, length=%.20g.",
+ (double) length);
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
- " Write JDAT chunk, length=%lu.",(unsigned long) length);
+ " Write JDAT chunk, length=%.20g.",(double) length);
}
/* Write JDAT chunk(s) */
(void) WriteBlobMSBULong(image,(size_t) length);
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
" Optimize: FALSE");
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
- " Image_info depth: %lu",(unsigned long) image_info->depth);
+ " Image_info depth: %.20g",(double) image_info->depth);
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
" Type: %d",image_info->type);
for (p=image; p != (Image *) NULL; p=GetNextImageInList(p))
{
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
- " Scene: %lu",(unsigned long) scene++);
+ " Scene: %.20g",(double) scene++);
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
- " Image depth: %lu",(unsigned long) p->depth);
+ " Image depth: %.20g",(double) p->depth);
if (p->matte)
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
" Matte: True");
" Storage class: DirectClass");
if (p->colors)
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
- " Number of colors: %lu",(unsigned long) p->colors);
+ " Number of colors: %.20g",(double) p->colors);
else
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
" Number of colors: unspecified");
if (logging != MagickFalse)
{
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
- " TERM delay: %lu",
- (unsigned long) (mng_info->ticks_per_second*
- final_delay/MagickMax(image->ticks_per_second,1)));
+ " TERM delay: %.20g",(double) (mng_info->ticks_per_second*
+ final_delay/MagickMax(image->ticks_per_second,1)));
if (image->iterations == 0)
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
- " TERM iterations: %lu",(unsigned long) PNG_UINT_31_MAX);
+ " TERM iterations: %.20g",(double) PNG_UINT_31_MAX);
else
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
- " Image iterations: %lu",(unsigned long) image->iterations);
+ " Image iterations: %.20g",(double) image->iterations);
}
(void) WriteBlob(image,14,chunk);
(void) WriteBlobMSBULong(image,crc32(0,chunk,14));
{
if (image->colorspace != RGBColorspace)
(void) TransformImageColorspace(image,RGBColorspace);
- (void) FormatMagickString(buffer,MaxTextExtent,"%lu %lu\n",
- (unsigned long) image->columns,(unsigned long) image->rows);
+ (void) FormatMagickString(buffer,MaxTextExtent,"%.20g %.20g\n",
+ (double) image->columns,(double) image->rows);
(void) WriteBlobString(image,buffer);
}
else
PAM header.
*/
(void) FormatMagickString(buffer,MaxTextExtent,
- "WIDTH %lu\nHEIGHT %lu\n",(unsigned long) image->columns,
- (unsigned long) image->rows);
+ "WIDTH %.20g\nHEIGHT %.20g\n",(double) image->columns,(double)
+ image->rows);
(void) WriteBlobString(image,buffer);
quantum_type=GetQuantumType(image,&image->exception);
switch (quantum_type)
if (image->depth > 16)
image->depth=16;
(void) FormatMagickString(buffer,MaxTextExtent,
- "DEPTH %lu\nMAXVAL %lu\n",(unsigned long) packet_size,(unsigned long)
+ "DEPTH %.20g\nMAXVAL %.20g\n",(double) packet_size,(double)
GetQuantumRange(image->depth));
(void) WriteBlobString(image,buffer);
(void) FormatMagickString(buffer,MaxTextExtent,"TUPLTYPE %s\nENDHDR\n",
*/
if (image->depth > 8)
image->depth=16;
- (void) FormatMagickString(buffer,MaxTextExtent,"%lu\n",(unsigned long)
+ (void) FormatMagickString(buffer,MaxTextExtent,"%.20g\n",(double)
GetQuantumRange(image->depth));
(void) WriteBlobString(image,buffer);
quantum_info=AcquireQuantumInfo((const ImageInfo *) NULL,image);
*/
if (image->depth > 8)
image->depth=16;
- (void) FormatMagickString(buffer,MaxTextExtent,"%lu\n",(unsigned long)
+ (void) FormatMagickString(buffer,MaxTextExtent,"%.20g\n",(double)
GetQuantumRange(image->depth));
(void) WriteBlobString(image,buffer);
quantum_info=AcquireQuantumInfo((const ImageInfo *) NULL,image);
/*
Note spot names.
*/
- (void) FormatMagickString(property,MaxTextExtent,"ps:SpotColor-%lu",
- spotcolor++);
+ (void) FormatMagickString(property,MaxTextExtent,"ps:SpotColor-%.20g",
+ (double) (spotcolor++));
for (p=command; *p != '\0'; p++)
if (isspace((int) (unsigned char) *p) != 0)
break;
page.width=(size_t) floor(page.width*image->x_resolution/delta.x+0.5);
page.height=(size_t) floor(page.height*image->y_resolution/delta.y+
0.5);
- (void) FormatMagickString(options,MaxTextExtent,"-g%lux%lu ",
- (unsigned long) page.width,(unsigned long) page.height);
+ (void) FormatMagickString(options,MaxTextExtent,"-g%.20gx%.20g ",(double)
+ page.width,(double) page.height);
read_info=CloneImageInfo(image_info);
*read_info->magick='\0';
if (read_info->number_scenes != 0)
char
pages[MaxTextExtent];
- (void) FormatMagickString(pages,MaxTextExtent,"-dFirstPage=%lu "
- "-dLastPage=%lu",(unsigned long) read_info->scene+1,(unsigned long)
+ (void) FormatMagickString(pages,MaxTextExtent,"-dFirstPage=%.20g "
+ "-dLastPage=%.20g",(double) read_info->scene+1,(double)
(read_info->scene+read_info->number_scenes));
(void) ConcatenateMagickString(options,pages,MaxTextExtent);
read_info->number_scenes=0;
resolution.y=(size_t) (100.0*2.54*resolution.y+0.5)/100.0;
}
SetGeometry(image,&geometry);
- (void) FormatMagickString(page_geometry,MaxTextExtent,"%lux%lu",
- (unsigned long) image->columns,(unsigned long) image->rows);
+ (void) FormatMagickString(page_geometry,MaxTextExtent,"%.20gx%.20g",
+ (double) image->columns,(double) image->rows);
if (image_info->page != (char *) NULL)
(void) CopyMagickString(page_geometry,image_info->page,MaxTextExtent);
else
if ((image->page.width != 0) && (image->page.height != 0))
- (void) FormatMagickString(page_geometry,MaxTextExtent,"%lux%lu%+ld%+ld",
- (unsigned long) image->page.width,(unsigned long) image->page.height,
- (long) image->page.x,(long) image->page.y);
+ (void) FormatMagickString(page_geometry,MaxTextExtent,
+ "%.20gx%.20g%+.20gx%+.20g",(double) image->page.width,(double)
+ image->page.height,(double) image->page.x,(double) image->page.y);
else
if ((image->gravity != UndefinedGravity) &&
(LocaleCompare(image_info->magick,"PS") == 0))
else
{
(void) FormatMagickString(buffer,MaxTextExtent,
- "%%%%BoundingBox: %ld %ld %ld %ld\n",(long) ceil(bounds.x1-0.5),
- (long) ceil(bounds.y1-0.5),(long) floor(bounds.x2+0.5),(long)
- floor(bounds.y2+0.5));
+ "%%%%BoundingBox: %.20g %.20g %.20g %.20g\n",ceil(bounds.x1-0.5),
+ ceil(bounds.y1-0.5),floor(bounds.x2+0.5),floor(bounds.y2+0.5));
(void) WriteBlobString(image,buffer);
(void) FormatMagickString(buffer,MaxTextExtent,
"%%%%HiResBoundingBox: %g %g %g %g\n",bounds.x1,
Embed Photoshop profile.
*/
(void) FormatMagickString(buffer,MaxTextExtent,
- "%%BeginPhotoshop: %lu",(unsigned long) GetStringInfoLength(
- profile));
+ "%%BeginPhotoshop: %.20g",(double) GetStringInfoLength(profile));
(void) WriteBlobString(image,buffer);
for (i=0; i < (ssize_t) GetStringInfoLength(profile); i++)
{
*/
(void) WriteBlobString(image,"\n%begin_xml_code\n");
(void) FormatMagickString(buffer,MaxTextExtent,
- "\n%%begin_xml_packet: %lu\n",(unsigned long)
+ "\n%%begin_xml_packet: %.20g\n",(double)
GetStringInfoLength(profile));
(void) WriteBlobString(image,buffer);
for (i=0; i < (ssize_t) GetStringInfoLength(profile); i++)
*/
(void) WriteBlobString(image,"%%Orientation: Portrait\n");
(void) WriteBlobString(image,"%%PageOrder: Ascend\n");
- (void) FormatMagickString(buffer,MaxTextExtent,"%%%%Pages: %lu\n",
- image_info->adjoin != MagickFalse ? (size_t)
- GetImageListLength(image) : 1UL);
+ (void) FormatMagickString(buffer,MaxTextExtent,"%%%%Pages: %.20g\n",
+ image_info->adjoin != MagickFalse ? (double)
+ GetImageListLength(image) : 1.0);
(void) WriteBlobString(image,buffer);
}
(void) WriteBlobString(image,"%%EndComments\n");
Dump image as bitmap.
*/
(void) FormatMagickString(buffer,MaxTextExtent,
- "%%%%BeginPreview: %lu %lu %lu %lu\n%% ",(unsigned long)
- preview_image->columns,(unsigned long) preview_image->rows,1UL,
- (unsigned long) ((((preview_image->columns+7) >> 3)*
- preview_image->rows+35)/36));
+ "%%%%BeginPreview: %.20g %.20g %.20g %.20g\n%% ",(double)
+ preview_image->columns,(double) preview_image->rows,1.0,
+ (double) ((((preview_image->columns+7) >> 3)*preview_image->rows+
+ 35)/36));
(void) WriteBlobString(image,buffer);
q=pixels;
for (y=0; y < (ssize_t) image->rows; y++)
(void) WriteBlobString(image,"} bind def\n");
(void) WriteBlobString(image,"%%EndProlog\n");
}
- (void) FormatMagickString(buffer,MaxTextExtent,"%%%%Page: 1 %lu\n",
- (unsigned long) page++);
+ (void) FormatMagickString(buffer,MaxTextExtent,"%%%%Page: 1 %.20g\n",
+ (double) (page++));
(void) WriteBlobString(image,buffer);
(void) FormatMagickString(buffer,MaxTextExtent,
- "%%%%PageBoundingBox: %ld %ld %ld %ld\n",(long) geometry.x,(long)
- geometry.y,geometry.x+(long) geometry.width,geometry.y+(long)
+ "%%%%PageBoundingBox: %.20g %.20g %.20g %.20g\n",(double) geometry.x,
+ (double) geometry.y,geometry.x+(double) geometry.width,geometry.y+(double)
(geometry.height+text_size));
(void) WriteBlobString(image,buffer);
if ((double) geometry.x < bounds.x1)
/*
Output image data.
*/
- (void) FormatMagickString(buffer,MaxTextExtent,"%ld %ld\n%g %g\n%g\n",
- (long) geometry.x,(long) geometry.y,scale.x,scale.y,pointsize);
+ (void) FormatMagickString(buffer,MaxTextExtent,"%.20g %.20g\n%g %g\n%g\n",
+ (double) geometry.x,(double) geometry.y,scale.x,scale.y,pointsize);
(void) WriteBlobString(image,buffer);
labels=(char **) NULL;
value=GetImageProperty(image,"label");
Dump image as grayscale.
*/
(void) FormatMagickString(buffer,MaxTextExtent,
- "%lu %lu\n1\n1\n1\n8\n",(unsigned long) image->columns,
- (unsigned long) image->rows);
+ "%.20g %.20g\n1\n1\n1\n8\n",(double) image->columns,(double)
+ image->rows);
(void) WriteBlobString(image,buffer);
q=pixels;
for (y=0; y < (ssize_t) image->rows; y++)
Dump image as bitmap.
*/
(void) FormatMagickString(buffer,MaxTextExtent,
- "%lu %lu\n1\n1\n1\n1\n",(unsigned long) image->columns,
- (unsigned long) image->rows);
+ "%.20g %.20g\n1\n1\n1\n1\n",(double) image->columns,(double)
+ image->rows);
(void) WriteBlobString(image,buffer);
q=pixels;
for (y=0; y < (ssize_t) image->rows; y++)
/*
Dump DirectClass image.
*/
- (void) FormatMagickString(buffer,MaxTextExtent,"%lu %lu\n0\n%d\n",
- (unsigned long) image->columns,(unsigned long) image->rows,
+ (void) FormatMagickString(buffer,MaxTextExtent,"%.20g %.20g\n0\n%d\n",
+ (double) image->columns,(double) image->rows,
image_info->compression == RLECompression ? 1 : 0);
(void) WriteBlobString(image,buffer);
switch (image_info->compression)
/*
Dump PseudoClass image.
*/
- (void) FormatMagickString(buffer,MaxTextExtent,"%lu %lu\n%d\n%d\n0\n",
- (unsigned long) image->columns,(unsigned long) image->rows,
- image->storage_class == PseudoClass ? 1 : 0,
+ (void) FormatMagickString(buffer,MaxTextExtent,
+ "%.20g %.20g\n%d\n%d\n0\n",(double) image->columns,(double)
+ image->rows,image->storage_class == PseudoClass ? 1 : 0,
image_info->compression == RLECompression ? 1 : 0);
(void) WriteBlobString(image,buffer);
/*
Dump number of colors and colormap.
*/
- (void) FormatMagickString(buffer,MaxTextExtent,"%lu\n",(unsigned long)
+ (void) FormatMagickString(buffer,MaxTextExtent,"%.20g\n",(double)
image->colors);
(void) WriteBlobString(image,buffer);
for (i=0; i < (ssize_t) image->colors; i++)
if (page > 2)
{
(void) FormatMagickString(buffer,MaxTextExtent,
- "%%%%BoundingBox: %ld %ld %ld %ld\n",(long) ceil(bounds.x1-0.5),
- (long) ceil(bounds.y1-0.5),(long) floor(bounds.x2+0.5),(long)
- floor(bounds.y2+0.5));
+ "%%%%BoundingBox: %.20g %.20g %.20g %.20g\n",ceil(bounds.x1-0.5),
+ ceil(bounds.y1-0.5),floor(bounds.x2+0.5),floor(bounds.y2+0.5));
(void) WriteBlobString(image,buffer);
(void) FormatMagickString(buffer,MaxTextExtent,
"%%%%HiResBoundingBox: %g %g %g %g\n",bounds.x1,bounds.y1,
resolution.y=(size_t) (100.0*2.54*resolution.y+0.5)/100.0;
}
SetGeometry(image,&geometry);
- (void) FormatMagickString(page_geometry,MaxTextExtent,"%lux%lu",
- (unsigned long) image->columns,(unsigned long) image->rows);
+ (void) FormatMagickString(page_geometry,MaxTextExtent,"%.20gx%.20g",
+ (double) image->columns,(double) image->rows);
if (image_info->page != (char *) NULL)
(void) CopyMagickString(page_geometry,image_info->page,MaxTextExtent);
else
if ((image->page.width != 0) && (image->page.height != 0))
- (void) FormatMagickString(page_geometry,MaxTextExtent,"%lux%lu%+ld%+ld",
- (unsigned long) image->page.width,(unsigned long) image->page.height,
- (long) image->page.x,(long) image->page.y);
+ (void) FormatMagickString(page_geometry,MaxTextExtent,
+ "%.20gx%.20g%+.20g%+.20g",(double) image->page.width,(double)
+ image->page.height,(double) image->page.x,(double) image->page.y);
else
if ((image->gravity != UndefinedGravity) &&
(LocaleCompare(image_info->magick,"PS") == 0))
else
{
(void) FormatMagickString(buffer,MaxTextExtent,
- "%%%%BoundingBox: %ld %ld %ld %ld\n",(long) ceil(bounds.x1-0.5),
- (long) ceil(bounds.y1-0.5),(long) floor(bounds.x2+0.5),(long)
- floor(bounds.y2+0.5));
+ "%%%%BoundingBox: %.20g %.20g %.20g %.20g\n",ceil(bounds.x1-0.5),
+ ceil(bounds.y1-0.5),floor(bounds.x2+0.5),floor(bounds.y2+0.5));
(void) WriteBlobString(image,buffer);
(void) FormatMagickString(buffer,MaxTextExtent,
"%%%%HiResBoundingBox: %g %g %g %g\n",bounds.x1,
if (image_info->adjoin == MagickFalse)
(void) CopyMagickString(buffer,"%%Pages: 1\n",MaxTextExtent);
else
- (void) FormatMagickString(buffer,MaxTextExtent,"%%%%Pages: %lu\n",
- (unsigned long) GetImageListLength(image));
+ (void) FormatMagickString(buffer,MaxTextExtent,
+ "%%%%Pages: %.20g\n",(double) GetImageListLength(image));
(void) WriteBlobString(image,buffer);
}
(void) WriteBlobString(image,"%%EndComments\n");
(void) WriteBlobString(image,"} bind def\n");
(void) WriteBlobString(image,"%%EndProlog\n");
}
- (void) FormatMagickString(buffer,MaxTextExtent,"%%%%Page: 1 %lu\n",
- (unsigned long) page++);
+ (void) FormatMagickString(buffer,MaxTextExtent,"%%%%Page: 1 %.20g\n",
+ (double) page++);
(void) WriteBlobString(image,buffer);
(void) FormatMagickString(buffer,MaxTextExtent,
- "%%%%PageBoundingBox: %ld %ld %ld %ld\n",(long) geometry.x,(long)
- geometry.y, geometry.x+(long) geometry.width,geometry.y+(long)
+ "%%%%PageBoundingBox: %.20g %.20g %.20g %.20g\n",(double) geometry.x,
+ (double) geometry.y,geometry.x+(double) geometry.width,geometry.y+(double)
(geometry.height+text_size));
(void) WriteBlobString(image,buffer);
if ((double) geometry.x < bounds.x1)
/*
Output image data.
*/
- (void) FormatMagickString(buffer,MaxTextExtent,"%ld %ld\n%g %g\n%g\n",
- (long) geometry.x,(long) geometry.y,scale.x,scale.y,pointsize);
+ (void) FormatMagickString(buffer,MaxTextExtent,"%.20g %.20g\n%g %g\n%g\n",
+ (double) geometry.x,(double) geometry.y,scale.x,scale.y,pointsize);
(void) WriteBlobString(image,buffer);
labels=(char **) NULL;
value=GetImageProperty(image,"label");
((image_info->type != TrueColorType) &&
(IsGrayImage(image,&image->exception) != MagickFalse)))
{
- (void) FormatMagickString(buffer,MaxTextExtent,"%lu %lu\n1\n%d\n",
- (unsigned long) image->columns,(unsigned long) image->rows,(int)
+ (void) FormatMagickString(buffer,MaxTextExtent,"%.20g %.20g\n1\n%d\n",
+ (double) image->columns,(double) image->rows,(int)
(image->colorspace == CMYKColorspace));
(void) WriteBlobString(image,buffer);
(void) FormatMagickString(buffer,MaxTextExtent,"%d\n",
ScaleQuantumToChar(PixelIntensityToQuantum(p)));
p++;
}
- progress=SetImageProgress(image,SaveImageTag,(MagickOffsetType) y,image->rows);
+ progress=SetImageProgress(image,SaveImageTag,(MagickOffsetType)
+ y,image->rows);
if (progress == MagickFalse)
break;
}
if ((image->storage_class == DirectClass) || (image->colors > 256) ||
(compression == JPEGCompression) || (image->matte != MagickFalse))
{
- (void) FormatMagickString(buffer,MaxTextExtent,"%lu %lu\n0\n%d\n",
- (unsigned long) image->columns,(unsigned long) image->rows,(int)
+ (void) FormatMagickString(buffer,MaxTextExtent,"%.20g %.20g\n0\n%d\n",
+ (double) image->columns,(double) image->rows,(int)
(image->colorspace == CMYKColorspace));
(void) WriteBlobString(image,buffer);
(void) FormatMagickString(buffer,MaxTextExtent,"%d\n",
/*
Dump number of colors and colormap.
*/
- (void) FormatMagickString(buffer,MaxTextExtent,"%lu %lu\n1\n%d\n",
- (unsigned long) image->columns,(unsigned long) image->rows,(int)
+ (void) FormatMagickString(buffer,MaxTextExtent,"%.20g %.20g\n1\n%d\n",
+ (double) image->columns,(double) image->rows,(int)
(image->colorspace == CMYKColorspace));
(void) WriteBlobString(image,buffer);
(void) FormatMagickString(buffer,MaxTextExtent,"%d\n",
(int) (compression == NoCompression));
(void) WriteBlobString(image,buffer);
- (void) FormatMagickString(buffer,MaxTextExtent,"%lu\n",(unsigned long)
+ (void) FormatMagickString(buffer,MaxTextExtent,"%.20g\n",(double)
image->colors);
(void) WriteBlobString(image,buffer);
for (i=0; i < (ssize_t) image->colors; i++)
if (page > 1)
{
(void) FormatMagickString(buffer,MaxTextExtent,
- "%%%%BoundingBox: %ld %ld %ld %ld\n",(long) ceil(bounds.x1-0.5),
- (long) ceil(bounds.y1-0.5),(long) floor(bounds.x2+0.5),(long)
- floor(bounds.y2+0.5));
+ "%%%%BoundingBox: %.20g %.20g %.20g %.20g\n",ceil(bounds.x1-0.5),
+ ceil(bounds.y1-0.5),floor(bounds.x2+0.5),floor(bounds.y2+0.5));
(void) WriteBlobString(image,buffer);
(void) FormatMagickString(buffer,MaxTextExtent,
"%%%%HiResBoundingBox: %g %g %g %g\n",bounds.x1,bounds.y1,
default:
{
(void) FormatMagickString(buffer,MaxTextExtent,
- "currentfile %lu %lu "PS3_NoCompression" ByteStreamDecodeFilter\n",
- (unsigned long) image->columns,(unsigned long) image->rows);
+ "currentfile %.20g %.20g "PS3_NoCompression" ByteStreamDecodeFilter\n",
+ (double) image->columns,(double) image->rows);
break;
}
case FaxCompression:
case Group4Compression:
{
(void) FormatMagickString(buffer,MaxTextExtent,
- "currentfile %lu %lu "PS3_FaxCompression" ByteStreamDecodeFilter\n",
- (unsigned long) image->columns,(unsigned long) image->rows);
+ "currentfile %.20g %.20g "PS3_FaxCompression" ByteStreamDecodeFilter\n",
+ (double) image->columns,(double) image->rows);
break;
}
case LZWCompression:
{
(void) FormatMagickString(buffer,MaxTextExtent,
- "currentfile %lu %lu "PS3_LZWCompression" ByteStreamDecodeFilter\n",
- (unsigned long) image->columns,(unsigned long) image->rows);
+ "currentfile %.20g %.20g "PS3_LZWCompression" ByteStreamDecodeFilter\n",
+ (double) image->columns,(double) image->rows);
break;
}
case RLECompression:
{
(void) FormatMagickString(buffer,MaxTextExtent,
- "currentfile %lu %lu "PS3_RLECompression" ByteStreamDecodeFilter\n",
- (unsigned long) image->columns,(unsigned long) image->rows);
+ "currentfile %.20g %.20g "PS3_RLECompression" ByteStreamDecodeFilter\n",
+ (double) image->columns,(double) image->rows);
break;
}
case ZipCompression:
{
(void) FormatMagickString(buffer,MaxTextExtent,
- "currentfile %lu %lu "PS3_ZipCompression" ByteStreamDecodeFilter\n",
- (unsigned long) image->columns,(unsigned long) image->rows);
+ "currentfile %.20g %.20g "PS3_ZipCompression" ByteStreamDecodeFilter\n",
+ (double) image->columns,(double) image->rows);
break;
}
}
resolution.y=(size_t) (100.0*2.54*resolution.y+0.5)/100.0;
}
SetGeometry(image,&geometry);
- (void) FormatMagickString(page_geometry,MaxTextExtent,"%lux%lu",
- (unsigned long) image->columns,(unsigned long) image->rows);
+ (void) FormatMagickString(page_geometry,MaxTextExtent,"%.20gx%.20g",
+ (double) image->columns,(double) image->rows);
if (image_info->page != (char *) NULL)
(void) CopyMagickString(page_geometry,image_info->page,MaxTextExtent);
else
if ((image->page.width != 0) && (image->page.height != 0))
- (void) FormatMagickString(page_geometry,MaxTextExtent,"%lux%lu%+ld%+ld",
- (unsigned long) image->page.width,(unsigned long) image->page.height,
- (long) image->page.x,(long) image->page.y);
+ (void) FormatMagickString(page_geometry,MaxTextExtent,
+ "%.20gx%.20g%+.20g%+.20g",(double) image->page.width,(double)
+ image->page.height,(double) image->page.x,(double) image->page.y);
else
if ((image->gravity != UndefinedGravity) &&
(LocaleCompare(image_info->magick,"PS") == 0))
if (image_info->adjoin == MagickFalse)
(void) CopyMagickString(buffer,"%%Pages: 1\n",MaxTextExtent);
else
- (void) FormatMagickString(buffer,MaxTextExtent,"%%%%Pages: %lu\n",
- (unsigned long) GetImageListLength(image));
+ (void) FormatMagickString(buffer,MaxTextExtent,
+ "%%%%Pages: %.20g\n",(double) GetImageListLength(image));
(void) WriteBlobString(image,buffer);
}
(void) WriteBlobString(image,"%%EndComments\n");
}
(void)WriteBlobString(image,"%%EndProlog\n");
}
- (void) FormatMagickString(buffer,MaxTextExtent,"%%%%Page: 1 %lu\n",
- (unsigned long) page);
+ (void) FormatMagickString(buffer,MaxTextExtent,"%%%%Page: 1 %.20g\n",
+ (double) page);
(void) WriteBlobString(image,buffer);
/*
Page bounding box.
*/
(void) FormatMagickString(buffer,MaxTextExtent,
- "%%%%PageBoundingBox: %ld %ld %ld %ld\n",(long) geometry.x,(long)
- geometry.y,geometry.x+(long) geometry.width,geometry.y+(long)
- (geometry.height+text_size));
+ "%%%%PageBoundingBox: %.20g %.20g %.20g %.20g\n",(double) geometry.x,
+ (double) geometry.y,geometry.x+(double) geometry.width,geometry.y+
+ (double) (geometry.height+text_size));
(void) WriteBlobString(image,buffer);
/*
Page process colors if not RGB.
/*
Translate, scale, and font point size.
*/
- (void) FormatMagickString(buffer,MaxTextExtent,"%ld %ld\n%g %g\n%g\n",
- (long) geometry.x,(long) geometry.y,scale.x,scale.y,pointsize);
+ (void) FormatMagickString(buffer,MaxTextExtent,"%.20g %.20g\n%g %g\n%g\n",
+ (double) geometry.x,(double) geometry.y,scale.x,scale.y,pointsize);
(void) WriteBlobString(image,buffer);
/*
Output labels.
/*
Image columns, rows, and color space.
*/
- (void) FormatMagickString(buffer,MaxTextExtent,"%lu %lu\n%s\n",
- (unsigned long) image->columns,(unsigned long) image->rows,
+ (void) FormatMagickString(buffer,MaxTextExtent,"%.20g %.20g\n%s\n",
+ (double) image->columns,(double) image->rows,
image->colorspace == CMYKColorspace ? PS3_CMYKColorspace :
PS3_RGBColorspace);
(void) WriteBlobString(image,buffer);
/*
Number of colors in color map.
*/
- (void) FormatMagickString(buffer,MaxTextExtent,"%lu\n",
- (unsigned long) image->colors);
+ (void) FormatMagickString(buffer,MaxTextExtent,"%.20g\n",
+ (double) image->colors);
(void) WriteBlobString(image,buffer);
/*
Color map - uncompressed.
psd_info.mode=ReadBlobMSBShort(image);
if (image->debug != MagickFalse)
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
- " Image is %lu x %lu with channels=%lu, depth=%lu, mode=%s",
- (unsigned long) psd_info.columns,(unsigned long) psd_info.rows,
- (unsigned long) psd_info.channels,(unsigned long) psd_info.depth,
- ModeToString((PSDImageType) psd_info.mode));
+ " Image is %.20g x %.20g with channels=%.20g, depth=%.20g, mode=%s",
+ (double) psd_info.columns,(double) psd_info.rows,(double)
+ psd_info.channels,(double) psd_info.depth,ModeToString((PSDImageType)
+ psd_info.mode));
/*
Initialize image.
*/
*/
if (image->debug != MagickFalse)
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
- " reading image resource blocks - %lu bytes",(unsigned long) length);
+ " reading image resource blocks - %.20g bytes",(double) length);
blocks=(unsigned char *) AcquireQuantumMemory((size_t) length,
sizeof(*blocks));
if (blocks == (unsigned char *) NULL)
number_layers=(short) ReadBlobMSBShort(image);
if (image->debug != MagickFalse)
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
- " image contains %ld layers",(long) number_layers);
+ " image contains %.20g layers",(double) number_layers);
if (number_layers < 0)
{
/*
{
if (image->debug != MagickFalse)
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
- " reading layer #%ld",(long) i+1);
+ " reading layer #%.20g",(double) i+1);
layer_info[i].page.y=(ssize_t) ReadBlobMSBLong(image);
layer_info[i].page.x=(ssize_t) ReadBlobMSBLong(image);
layer_info[i].page.height=(size_t)
ThrowReaderException(CorruptImageError,"MaximumChannelsExceeded");
if (image->debug != MagickFalse)
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
- " offset(%ld,%ld), size(%ld,%ld), channels=%ld",
- (long) layer_info[i].page.x,(long) layer_info[i].page.y,
- (long) layer_info[i].page.height,(long)
- layer_info[i].page.width,(long) layer_info[i].channels);
+ " offset(%.20g,%.20g), size(%.20g,%.20g), channels=%.20g",
+ (double) layer_info[i].page.x,(double) layer_info[i].page.y,
+ (double) layer_info[i].page.height,(double)
+ layer_info[i].page.width,(double) layer_info[i].channels);
for (j=0; j < (ssize_t) layer_info[i].channels; j++)
{
layer_info[i].channel_info[j].type=(short)
GetPSDSize(&psd_info,image);
if (image->debug != MagickFalse)
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
- " channel[%ld]: type=%ld, size=%ld",(long) j,
- (long) layer_info[i].channel_info[j].type,
- (long) layer_info[i].channel_info[j].size);
+ " channel[%.20g]: type=%.20g, size=%.20g",(double) j,
+ (double) layer_info[i].channel_info[j].type,
+ (double) layer_info[i].channel_info[j].size);
}
count=ReadBlob(image,4,(unsigned char *) type);
if ((count == 0) || (LocaleNCompare(type,"8BIM",4) != 0))
layer_info[i].visible=!(layer_info[i].flags & 0x02);
if (image->debug != MagickFalse)
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
- " blend=%.4s, opacity=%lu, clipping=%s, flags=%d, visible=%s",
- layer_info[i].blendkey,(long) layer_info[i].opacity,
+ " blend=%.4s, opacity=%.20g, clipping=%s, flags=%d, visible=%s",
+ layer_info[i].blendkey,(double) layer_info[i].opacity,
layer_info[i].clipping ? "true" : "false",layer_info[i].flags,
layer_info[i].visible ? "true" : "false");
(void) ReadBlobByte(image); /* filler */
layer_info[i].mask.width+=4294967295UL;
if (image->debug != MagickFalse)
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
- " layer mask: offset(%ld,%ld), size(%ld,%ld), length=%ld",
- (long) layer_info[i].mask.x,(long) layer_info[i].mask.y,
- (long) layer_info[i].mask.width,(long)
- layer_info[i].mask.height,(long) length-16);
+ " layer mask: offset(%.20g,%.20g), size(%.20g,%.20g), length=%.20g",
+ (double) layer_info[i].mask.x,(double) layer_info[i].mask.y,
+ (double) layer_info[i].mask.width,(double)
+ layer_info[i].mask.height,(double) length-16);
/*
Skip over the rest of the layer mask information.
*/
*/
if (image->debug != MagickFalse)
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
- " layer blending ranges: length=%ld",(long)
+ " layer blending ranges: length=%.20g",(double)
length);
/*
We read it, but don't use it...
{
if (image->debug != MagickFalse)
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
- " adjustment layer key: %.4s, data length=%ld",
- alkey, length);
+ " adjustment layer key: %.4s, data length=%.20g",
+ alkey, (double) length);
}
if ( length ) {
*/
if (image->debug != MagickFalse)
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
- " unsupported data: length=%ld",(long)
+ " unsupported data: length=%.20g",(double)
(size-combinedlength));
for (j=0; j < (ssize_t) (size-combinedlength); j++)
(void) ReadBlobByte(image);
layer_info[j].image=DestroyImage(layer_info[j].image);
if (image->debug != MagickFalse)
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
- " allocation of image for layer %ld failed",(long) i);
+ " allocation of image for layer %.20g failed",(double) i);
ThrowReaderException(ResourceLimitError,
"MemoryAllocationFailed");
}
/*
Set up some hidden attributes for folks that need them.
*/
- (void) FormatMagickString(message,MaxTextExtent,"%ld",
- (long) layer_info[i].page.x);
+ (void) FormatMagickString(message,MaxTextExtent,"%.20gld",
+ (double) layer_info[i].page.x);
(void) SetImageArtifact(layer_info[i].image,"psd:layer.x",message);
- (void) FormatMagickString(message,MaxTextExtent,"%ld",
- (long) layer_info[i].page.y);
+ (void) FormatMagickString(message,MaxTextExtent,"%.20g",
+ (double) layer_info[i].page.y);
(void) SetImageArtifact(layer_info[i].image,"psd:layer.y",message);
- (void) FormatMagickString(message,MaxTextExtent,"%lu",
- (unsigned long) layer_info[i].opacity);
+ (void) FormatMagickString(message,MaxTextExtent,"%.20g",
+ (double) layer_info[i].opacity);
(void) SetImageArtifact(layer_info[i].image,"psd:layer.opacity",
message);
(void) SetImageProperty(layer_info[i].image,"label",(char *)
{
if (image->debug != MagickFalse)
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
- " reading data for layer %ld",(long) i);
+ " reading data for layer %.20g",(double) i);
for (j=0; j < (ssize_t) layer_info[i].channels; j++)
{
if (image->debug != MagickFalse)
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
- " reading data for channel %ld",(long) j);
+ " reading data for channel %.20g",(double) j);
#if 1
if (layer_info[i].channel_info[j].size <= (2*layer_info[i].image->rows))
{
svg_info->view_box=svg_info->bounds;
svg_info->width=(size_t) floor(svg_info->bounds.width+0.5);
svg_info->height=(size_t) floor(svg_info->bounds.height+0.5);
- MVGPrintf(svg_info->file,"viewbox 0 0 %lu %lu\n",(unsigned long)
- svg_info->width,(unsigned long) svg_info->height);
+ MVGPrintf(svg_info->file,"viewbox 0 0 %.20g %.20g\n",(double)
+ svg_info->width,(double) 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 %g 0 0 %g 0.0 0.0\n",sx,sy);
Receiving some characters from the parser.
*/
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
- " SAX.characters(%s,%lu)",c,(unsigned long) length);
+ " SAX.characters(%s,%.20g)",c,(double) length);
svg_info=(SVGInfo *) context;
if (svg_info->text != (char *) NULL)
svg_info->text=(char *) ResizeQuantumMemory(svg_info->text,
(void) WriteBlobString(image,
" \"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd\">\n");
(void) FormatMagickString(message,MaxTextExtent,
- "<svg width=\"%lu\" height=\"%lu\">\n",(unsigned long) image->columns,
- (unsigned long) image->rows);
+ "<svg width=\"%.20g\" height=\"%.20g\">\n",(double) image->columns,
+ (double) image->rows);
(void) WriteBlobString(image,message);
GetMagickPixelPacket(image,&pixel);
for (y=0; y < (ssize_t) image->rows; y++)
(void) QueryMagickColorname(image,&pixel,SVGCompliance,tuple,
&image->exception);
(void) FormatMagickString(message,MaxTextExtent,
- " <circle cx=\"%ld\" cy=\"%ld\" r=\"1\" fill=\"%s\"/>\n",(long) x,
- (long) y,tuple);
+ " <circle cx=\"%.20g\" cy=\"%.20g\" r=\"1\" fill=\"%s\"/>\n",
+ (double) x,(double) y,tuple);
(void) WriteBlobString(image,message);
p++;
}
(void) WriteBlobString(image,
" \"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd\">\n");
(void) FormatMagickString(message,MaxTextExtent,
- "<svg width=\"%lu\" height=\"%lu\">\n",(unsigned long) image->columns,
- (unsigned long) image->rows);
+ "<svg width=\"%.20g\" height=\"%.20g\">\n",(double) image->columns,(double)
+ image->rows);
(void) WriteBlobString(image,message);
/*
Allocate primitive info memory.
image->rows=(size_t) height;
image->depth=(size_t) bits_per_sample;
if (image->debug != MagickFalse)
- (void) LogMagickEvent(CoderEvent,GetMagickModule(),"Image depth: %lu",
- (unsigned long) image->depth);
+ (void) LogMagickEvent(CoderEvent,GetMagickModule(),"Image depth: %.20g",
+ (double) image->depth);
lsb_first=1;
image->endian=MSBEndian;
if ((int) (*(char *) &lsb_first) != 0)
draw_info=CloneDrawInfo(image_info,(DrawInfo *) NULL);
draw_info->font=AcquireString(image->filename);
ConcatenateString(&draw_info->primitive,"push graphic-context\n");
- (void) FormatMagickString(buffer,MaxTextExtent," viewbox 0 0 %lu %lu\n",
- (unsigned long) image->columns,(unsigned long) image->rows);
+ (void) FormatMagickString(buffer,MaxTextExtent," viewbox 0 0 %.20g %.20g\n",
+ (double) image->columns,(double) image->rows);
ConcatenateString(&draw_info->primitive,buffer);
ConcatenateString(&draw_info->primitive," font-size 18\n");
- (void) FormatMagickString(buffer,MaxTextExtent," text 10,%ld '",(long) y);
+ (void) FormatMagickString(buffer,MaxTextExtent," text 10,%.20g '",(double) y);
ConcatenateString(&draw_info->primitive,buffer);
text=EscapeString(Text,'"');
ConcatenateString(&draw_info->primitive,text);
{
y+=i+12;
ConcatenateString(&draw_info->primitive," font-size 18\n");
- (void) FormatMagickString(buffer,MaxTextExtent," text 10,%ld '%ld'\n",
- (long) y,(long) i);
+ (void) FormatMagickString(buffer,MaxTextExtent," text 10,%.20g '%.20g'\n",
+ (double) y,(double) i);
ConcatenateString(&draw_info->primitive,buffer);
- (void) FormatMagickString(buffer,MaxTextExtent," font-size %ld\n",(long) i);
+ (void) FormatMagickString(buffer,MaxTextExtent," font-size %.20g\n",
+ (double) i);
ConcatenateString(&draw_info->primitive,buffer);
- (void) FormatMagickString(buffer,MaxTextExtent," text 50,%ld "
- "'That which does not destroy me, only makes me stronger.'\n",(long) y);
+ (void) FormatMagickString(buffer,MaxTextExtent," text 50,%.20g "
+ "'That which does not destroy me, only makes me stronger.'\n",(double) y);
ConcatenateString(&draw_info->primitive,buffer);
if (i >= 24)
i+=6;
if (image->matte != MagickFalse)
(void) ConcatenateMagickString(colorspace,"a",MaxTextExtent);
(void) FormatMagickString(buffer,MaxTextExtent,
- "# ImageMagick pixel enumeration: %lu,%lu,%lu,%s\n",(unsigned long)
- image->columns,(unsigned long) image->rows,(unsigned long)
+ "# ImageMagick pixel enumeration: %.20g,%.20g,%.20g,%s\n",(double)
+ image->columns,(double) image->rows,(double)
GetQuantumRange(image->depth),colorspace);
(void) WriteBlobString(image,buffer);
GetMagickPixelPacket(image,&pixel);
indexes=GetVirtualIndexQueue(image);
for (x=0; x < (ssize_t) image->columns; x++)
{
- (void) FormatMagickString(buffer,MaxTextExtent,"%ld,%ld: ",(long) x,
- (long) y);
+ (void) FormatMagickString(buffer,MaxTextExtent,"%.20g,%.20g: ",(double)
+ x,(double) y);
(void) WriteBlobString(image,buffer);
SetMagickPixelPacket(image,p,indexes+x,&pixel);
(void) CopyMagickString(tuple,"(",MaxTextExtent);
*/
(void) ResetMagickMemory(header,' ',MaxTextExtent);
(void) FormatMagickString(header,MaxTextExtent,
- "LBLSIZE=%lu FORMAT='BYTE' TYPE='IMAGE' BUFSIZE=20000 DIM=2 EOL=0 "
- "RECSIZE=%lu ORG='BSQ' NL=%lu NS=%lu NB=1 N1=0 N2=0 N3=0 N4=0 NBB=0 "
- "NLB=0 TASK='ImageMagick'",(unsigned long) MaxTextExtent,(unsigned long)
- image->columns,(unsigned long) image->rows,(unsigned long) image->columns);
+ "LBLSIZE=%.20g FORMAT='BYTE' TYPE='IMAGE' BUFSIZE=20000 DIM=2 EOL=0 "
+ "RECSIZE=%.20g ORG='BSQ' NL=%.20g NS=%.20g NB=1 N1=0 N2=0 N3=0 N4=0 NBB=0 "
+ "NLB=0 TASK='ImageMagick'",(double) MaxTextExtent,(double) image->columns,
+ (double) image->rows,(double) image->columns);
(void) WriteBlob(image,MaxTextExtent,(unsigned char *) header);
/*
Write VICAR pixels.
(void) SetImageProperty(next_image,"label",label);
label=DestroyString(label);
if (image_info->debug != MagickFalse)
- (void) LogMagickEvent(CoderEvent,GetMagickModule(),"geometry: %lux%lu",
- (unsigned long) next_image->columns,(unsigned long) next_image->rows);
+ (void) LogMagickEvent(CoderEvent,GetMagickModule(),
+ "geometry: %.20gx%.20g",(double) next_image->columns,(double)
+ next_image->rows);
SetGeometry(next_image,&geometry);
(void) ParseMetaGeometry(read_info->size,&geometry.x,&geometry.y,
&geometry.width,&geometry.height);
}
if (image_info->debug != MagickFalse)
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
- "thumbnail geometry: %lux%lu",(unsigned long) next_image->columns,
- (unsigned long) next_image->rows);
+ "thumbnail geometry: %.20gx%.20g",(double) next_image->columns,(double)
+ next_image->rows);
AppendImageToList(&images,next_image);
status=SetImageProgress(images,LoadImagesTag,i,number_files);
if (status == MagickFalse)
if(x!=0)
{
(void) fprintf(stderr,
- "\nUnsupported WPG2 unaligned token RST x=%lu, please report!\n"
- ,(unsigned long) x);
+ "\nUnsupported WPG2 unaligned token RST x=%.20g, please report!\n"
+ ,(double) x);
return(-3);
}
{
Write X bitmap header.
*/
GetPathComponent(image->filename,BasePath,basename);
- (void) FormatMagickString(buffer,MaxTextExtent,"#define %s_width %lu\n",
- basename,(unsigned long) image->columns);
+ (void) FormatMagickString(buffer,MaxTextExtent,"#define %s_width %.20g\n",
+ basename,(double) image->columns);
(void) WriteBlob(image,strlen(buffer),(unsigned char *) buffer);
- (void) FormatMagickString(buffer,MaxTextExtent,"#define %s_height %lu\n",
- basename,(unsigned long) image->rows);
+ (void) FormatMagickString(buffer,MaxTextExtent,"#define %s_height %.20g\n",
+ basename,(double) image->rows);
(void) WriteBlob(image,strlen(buffer),(unsigned char *) buffer);
(void) FormatMagickString(buffer,MaxTextExtent,
"static char %s_bits[] = {\n",basename);
"static char *%s[] = {\n",basename);
(void) WriteBlobString(image,buffer);
(void) WriteBlobString(image,"/* columns rows colors chars-per-pixel */\n");
- (void) FormatMagickString(buffer,MaxTextExtent,"\"%lu %lu %lu %lu\",\n",
- (unsigned long) picon->columns,(unsigned long) picon->rows,(unsigned long)
- colors,(unsigned long) characters_per_pixel);
+ (void) FormatMagickString(buffer,MaxTextExtent,
+ "\"%.20g %.20g %.20g %.20g\",\n",(double) picon->columns,(double)
+ picon->rows,(double) colors,(double) characters_per_pixel);
(void) WriteBlobString(image,buffer);
GetMagickPixelPacket(image,&pixel);
for (i=0; i < (ssize_t) colors; i++)
"static char *%s[] = {\n",basename);
(void) WriteBlobString(image,buffer);
(void) WriteBlobString(image,"/* columns rows colors chars-per-pixel */\n");
- (void) FormatMagickString(buffer,MaxTextExtent,"\"%lu %lu %lu %lu\",\n",
- (unsigned long) image->columns,(unsigned long) image->rows,(unsigned long)
- image->colors,(unsigned long) characters_per_pixel);
+ (void) FormatMagickString(buffer,MaxTextExtent,
+ "\"%.20g %.20g %.20g %.20g \",\n",(double) image->columns,(double)
+ image->rows,(double) image->colors,(double) characters_per_pixel);
(void) WriteBlobString(image,buffer);
GetMagickPixelPacket(image,&pixel);
for (i=0; i < (ssize_t) image->colors; i++)
(void) ParseAbsoluteGeometry(PSPageGeometry,&page);
if (image_info->page != (char *) NULL)
(void) ParseAbsoluteGeometry(image_info->page,&page);
- (void) FormatMagickString(geometry,MaxTextExtent,"%lux%lu",
- (unsigned long) page.width,(unsigned long) page.height);
+ (void) FormatMagickString(geometry,MaxTextExtent,"%.20gx%.20g",(double)
+ page.width,(double) page.height);
if (image_info->monochrome != MagickFalse)
delegate_info=GetDelegateInfo("xps:mono",(char *) NULL,exception);
else
page.width=(size_t) floor(page.width*image->y_resolution/delta.x+0.5);
page.height=(size_t) floor(page.height*image->y_resolution/delta.y+
0.5);
- (void) FormatMagickString(options,MaxTextExtent,"-g%lux%lu ",
- (unsigned long) page.width,(unsigned long) page.height);
+ (void) FormatMagickString(options,MaxTextExtent,"-g%.20gx%.20g ",(double)
+ page.width,(double) page.height);
image=DestroyImage(image);
read_info=CloneImageInfo(image_info);
*read_info->magick='\0';
if (read_info->number_scenes != 0)
{
if (read_info->number_scenes != 1)
- (void) FormatMagickString(options,MaxTextExtent,"-dLastPage=%lu",
- (unsigned long) (read_info->scene+read_info->number_scenes));
+ (void) FormatMagickString(options,MaxTextExtent,"-dLastPage=%.20g",
+ (double) (read_info->scene+read_info->number_scenes));
else
(void) FormatMagickString(options,MaxTextExtent,
- "-dFirstPage=%lu -dLastPage=%lu",(unsigned long) read_info->scene+1,
- (unsigned long) (read_info->scene+read_info->number_scenes));
+ "-dFirstPage=%.20g -dLastPage=%.20g",(double) read_info->scene+1,
+ (double) (read_info->scene+read_info->number_scenes));
read_info->number_scenes=0;
if (read_info->scenes != (char *) NULL)
*read_info->scenes='\0';
if (display_image->debug != MagickFalse)
{
(void) LogMagickEvent(X11Event,GetMagickModule(),
- "Image: %s[%lu] %lux%lu ",image_list[0]->filename,
- (unsigned long) image_list[0]->scene,(unsigned long)
- image_list[0]->columns,(unsigned long) image_list[0]->rows);
+ "Image: %s[%.20g] %.20gx%.20g ",image_list[0]->filename,(double)
+ image_list[0]->scene,(double) image_list[0]->columns,(double)
+ image_list[0]->rows);
if (image_list[0]->colors != 0)
- (void) LogMagickEvent(X11Event,GetMagickModule(),"%luc ",
- (unsigned long) image_list[0]->colors);
+ (void) LogMagickEvent(X11Event,GetMagickModule(),"%.20gc ",(double)
+ image_list[0]->colors);
(void) LogMagickEvent(X11Event,GetMagickModule(),"%s",
image_list[0]->magick);
}
if (display_image->debug != MagickFalse)
{
(void) LogMagickEvent(X11Event,GetMagickModule(),
- "Image: [%lu] %s %ux%u ",(unsigned long) image_list[scene]->scene,
- image_list[scene]->filename,columns,rows);
+ "Image: [%.20g] %s %.20gx%.20g ",(double) image_list[scene]->scene,
+ image_list[scene]->filename,(double) columns,(double) rows);
if (image_list[scene]->colors != 0)
- (void) LogMagickEvent(X11Event,GetMagickModule(),"%luc ",
- (unsigned long) image_list[scene]->colors);
+ (void) LogMagickEvent(X11Event,GetMagickModule(),"%.20gc ",(double)
+ image_list[scene]->colors);
(void) LogMagickEvent(X11Event,GetMagickModule(),"%s",
image_list[scene]->magick);
}
if (display_image->debug != MagickFalse)
{
(void) LogMagickEvent(X11Event,GetMagickModule(),
- "Image: %s[%lu] %lux%lu ",display_image->filename,(unsigned long)
- display_image->scene,(unsigned long) display_image->columns,
- (unsigned long) display_image->rows);
+ "Image: %s[%.20g] %.20gx%.20g ",display_image->filename,(double)
+ display_image->scene,(double) display_image->columns,(double)
+ display_image->rows);
if (display_image->colors != 0)
- (void) LogMagickEvent(X11Event,GetMagickModule(),"%luc ",
- (unsigned long) display_image->colors);
+ (void) LogMagickEvent(X11Event,GetMagickModule(),"%.20gc ",(double)
+ display_image->colors);
(void) LogMagickEvent(X11Event,GetMagickModule(),"%s",
display_image->magick);
}
*/
GetPathComponent(display_image->magick_filename,TailPath,filename);
(void) FormatMagickString(windows->image.name,MaxTextExtent,
- "%s: %s[%lu of %lu]",MagickPackageName,filename,(unsigned long)
- display_image->scene,(unsigned long) number_scenes);
+ "%s: %s[%.20g of %.20g]",MagickPackageName,filename,(double)
+ display_image->scene,(double) number_scenes);
(void) CopyMagickString(windows->image.icon_name,filename,MaxTextExtent);
}
if (resource_info->immutable != MagickFalse)
if (image_list[scene]->debug != MagickFalse)
{
(void) LogMagickEvent(X11Event,GetMagickModule(),
- "Image: [%lu] %s %ux%u ",(unsigned long) image_list[scene]->scene,
- image_list[scene]->filename,columns,rows);
+ "Image: [%.20g] %s %.20gx%.20g ",(double) image_list[scene]->scene,
+ image_list[scene]->filename,(double) columns,(double) rows);
if (image_list[scene]->colors != 0)
- (void) LogMagickEvent(X11Event,GetMagickModule(),"%luc ",
- (unsigned long) image_list[scene]->colors);
+ (void) LogMagickEvent(X11Event,GetMagickModule(),"%.20gc ",(double)
+ image_list[scene]->colors);
(void) LogMagickEvent(X11Event,GetMagickModule(),"%s",
image_list[scene]->magick);
}
while ((p > image_list[scene]->magick_filename) && (*(p-1) != '/'))
p--;
(void) FormatMagickString(windows->image.name,MaxTextExtent,
- "%s: %s[%lu of %lu]",MagickPackageName,p,(unsigned long) scene+1,
- (unsigned long) number_scenes);
+ "%s: %s[%.20g of %.20g]",MagickPackageName,p,(double) scene+1,
+ (double) number_scenes);
}
status=XStringListToTextProperty(&windows->image.name,1,&window_name);
if (status != Success)
while ((p > image_list[scene]->filename) && (*(p-1) != '/'))
p--;
(void) FormatMagickString(windows->image.name,MaxTextExtent,
- "%s: %s[%lu of %lu]",MagickPackageName,p,(unsigned long)
- scene+1,(unsigned long) number_scenes);
+ "%s: %s[%.20g of %.20g]",MagickPackageName,p,(double)
+ scene+1,(double) number_scenes);
if (resource_info->title != (char *) NULL)
{
char
/*
Request JPEG quality from user.
*/
- (void) FormatMagickString(quality,MaxTextExtent,"%lu",
- (unsigned long) image_info->quality);
+ (void) FormatMagickString(quality,MaxTextExtent,"%.20g",(double)
+ image_info->quality);
status=XDialogWidget(display,windows,"Save","Enter JPEG quality:",
quality);
if (*quality == '\0')
undercolor_info->affine.tx=offset.x-draw_info->affine.ry*metrics.ascent;
undercolor_info->affine.ty=offset.y-draw_info->affine.sy*metrics.ascent;
(void) FormatMagickString(primitive,MaxTextExtent,
- "rectangle 0,0 %g,%lu",metrics.origin.x,(unsigned long) height);
+ "rectangle 0,0 %g,%.20g",metrics.origin.x,(double) height);
(void) CloneString(&undercolor_info->primitive,primitive);
(void) DrawImage(image,undercolor_info);
(void) DestroyDrawInfo(undercolor_info);
text=DestroyString(text);
(void) fprintf(file,"showpage\n");
(void) fclose(file);
- (void) FormatMagickString(geometry,MaxTextExtent,"%ldx%ld+0+0!",(long)
- floor(extent.x+0.5),(long) floor(extent.y+0.5));
+ (void) FormatMagickString(geometry,MaxTextExtent,"%.20gx%.20g+0+0!",
+ floor(extent.x+0.5),floor(extent.y+0.5));
annotate_info=AcquireImageInfo();
(void) FormatMagickString(annotate_info->filename,MaxTextExtent,"ps:%s",
filename);
ExpandAffine(&draw_info->affine)*draw_info->pointsize+0.5);
crop_info.y=(ssize_t) ceil((resolution.y/DefaultResolution)*extent.y/8.0-
0.5);
- (void) FormatMagickString(geometry,MaxTextExtent,"%lux%lu%+ld%+ld",
- (unsigned long) crop_info.width,(unsigned long) crop_info.height,
- (long) crop_info.x,(long) crop_info.y);
+ (void) FormatMagickString(geometry,MaxTextExtent,
+ "%.20gx%.20g%+.20gx%+.20g",(double) crop_info.width,(double)
+ crop_info.height,(double) crop_info.x,(double) crop_info.y);
(void) TransformImage(&annotate_image,geometry,(char *) NULL);
}
metrics->pixels_per_em.x=(resolution.y/DefaultResolution)*
atan2(draw_info->affine.rx,draw_info->affine.sx);
}
(void) FormatMagickString(annotate_info.geometry,MaxTextExtent,
- "%lux%lu+%ld+%ld",(unsigned long) width,(unsigned long) height,(long)
- ceil(offset->x-0.5),(long) ceil(offset->y-metrics->ascent-metrics->descent+
+ "%.20gx%.20g%+.20gx%+.20g",(double) width,(double) height,
+ ceil(offset->x-0.5),ceil(offset->y-metrics->ascent-metrics->descent+
draw_info->interline_spacing-0.5));
pixel.pen_color.red=ScaleQuantumToShort(draw_info->fill.red);
pixel.pen_color.green=ScaleQuantumToShort(draw_info->fill.green);
%
*/
-MagickExport size_t GetImageDepth(const Image *image,
- ExceptionInfo *exception)
+static inline QuantumAny GetPixelDepth(const Quantum pixel,
+ const QuantumAny scale)
+{
+#if !defined(MAGICKCORE_HDRI_SUPPORT)
+ return((QuantumAny) (scale*(pixel/scale)));
+#else
+ return((QuantumAny) (scale*(pixel/scale)+0.5));
+#endif
+}
+
+MagickExport size_t GetImageDepth(const Image *image,ExceptionInfo *exception)
{
return(GetImageChannelDepth(image,AllChannels,exception));
}
status;
QuantumAny
- range;
+ scale;
status=0;
- range=GetQuantumRange(current_depth[id]);
+ scale=1;
+ if (depth < QuantumDepth)
+ scale=QuantumRange/((QuantumAny) QuantumRange >> (QuantumDepth-
+ current_depth[id]));
if ((channel & RedChannel) != 0)
- status|=p->red != ScaleAnyToQuantum(ScaleQuantumToAny(p->red,
- range),range);
+ status|=(QuantumAny) p->red != GetPixelDepth(p->red,scale);
if ((channel & GreenChannel) != 0)
- status|=p->green != ScaleAnyToQuantum(ScaleQuantumToAny(p->green,
- range),range);
+ status|=(QuantumAny) p->green != GetPixelDepth(p->green,scale);
if ((channel & BlueChannel) != 0)
- status|=p->blue != ScaleAnyToQuantum(ScaleQuantumToAny(p->blue,
- range),range);
+ status|=(QuantumAny) p->blue != GetPixelDepth(p->blue,scale);
if (status == 0)
break;
current_depth[id]++;
status;
QuantumAny
- range;
+ scale;
status=0;
- range=GetQuantumRange(current_depth[id]);
+ scale=1;
+ if (depth < QuantumDepth)
+ scale=QuantumRange/((QuantumAny) QuantumRange >> (QuantumDepth-
+ current_depth[id]));
if ((channel & RedChannel) != 0)
- status|=p->red != ScaleAnyToQuantum(ScaleQuantumToAny(p->red,range),
- range);
+ status|=(QuantumAny) p->red != GetPixelDepth(p->red,scale);
if ((channel & GreenChannel) != 0)
- status|=p->green != ScaleAnyToQuantum(ScaleQuantumToAny(p->green,
- range),range);
+ status|=(QuantumAny) p->green != GetPixelDepth(p->green,scale);
if ((channel & BlueChannel) != 0)
- status|=p->blue != ScaleAnyToQuantum(ScaleQuantumToAny(p->blue,range),
- range);
+ status|=(QuantumAny) p->blue != GetPixelDepth(p->blue,scale);
if (((channel & OpacityChannel) != 0) && (image->matte != MagickFalse))
- status|=p->opacity != ScaleAnyToQuantum(ScaleQuantumToAny(p->opacity,
- range),range);
+ status|=(QuantumAny) p->opacity != GetPixelDepth(p->opacity,scale);
if (((channel & IndexChannel) != 0) &&
(image->colorspace == CMYKColorspace))
- status|=indexes[x] != ScaleAnyToQuantum(ScaleQuantumToAny(indexes[x],
- range),range);
+ status|=(QuantumAny) indexes[x] != GetPixelDepth(indexes[x],scale);
if (status == 0)
break;
current_depth[id]++;
%
*/
+static inline Quantum SetPixelDepth(const Quantum pixel,
+ const QuantumAny scale)
+{
+ return((Quantum) (scale*(pixel/scale)));
+}
+
MagickExport MagickBooleanType SetImageDepth(Image *image,
const size_t depth)
{
status;
QuantumAny
- range;
+ scale;
assert(image != (Image *) NULL);
if (image->debug != MagickFalse)
Scale pixels to desired depth.
*/
status=MagickTrue;
- range=GetQuantumRange(depth);
+ scale=1;
+ if (depth < QuantumDepth)
+ scale=QuantumRange/((QuantumAny) QuantumRange >> (QuantumDepth-depth));
exception=(&image->exception);
image_view=AcquireCacheView(image);
#if defined(MAGICKCORE_OPENMP_SUPPORT)
for (x=0; x < (ssize_t) image->columns; x++)
{
if ((channel & RedChannel) != 0)
- q->red=ScaleAnyToQuantum(ScaleQuantumToAny(q->red,range),range);
+ q->red=SetPixelDepth(q->red,scale);
if ((channel & GreenChannel) != 0)
- q->green=ScaleAnyToQuantum(ScaleQuantumToAny(q->green,range),range);
+ q->green=SetPixelDepth(q->green,scale);
if ((channel & BlueChannel) != 0)
- q->blue=ScaleAnyToQuantum(ScaleQuantumToAny(q->blue,range),range);
+ q->green=SetPixelDepth(q->blue,scale);
if (((channel & OpacityChannel) != 0) && (image->matte != MagickFalse))
- q->opacity=ScaleAnyToQuantum(ScaleQuantumToAny(q->opacity,range),range);
+ q->opacity=SetPixelDepth(q->opacity,scale);
if (((channel & IndexChannel) != 0) &&
(image->colorspace == CMYKColorspace))
- indexes[x]=ScaleAnyToQuantum(ScaleQuantumToAny(indexes[x],range),range);
+ indexes[x]=SetPixelDepth(indexes[x],scale);
q++;
}
if (SyncCacheViewAuthenticPixels(image_view,exception) == MagickFalse)
for (i=0; i < (ssize_t) image->colors; i++)
{
if ((channel & RedChannel) != 0)
- p->red=ScaleAnyToQuantum(ScaleQuantumToAny(p->red,range),range);
+ p->red=SetPixelDepth(p->red,scale);
if ((channel & GreenChannel) != 0)
- p->green=ScaleAnyToQuantum(ScaleQuantumToAny(p->green,range),range);
+ p->green=SetPixelDepth(p->green,scale);
if ((channel & BlueChannel) != 0)
- p->blue=ScaleAnyToQuantum(ScaleQuantumToAny(p->blue,range),range);
+ p->blue=SetPixelDepth(p->blue,scale);
if ((channel & OpacityChannel) != 0)
- p->opacity=ScaleAnyToQuantum(ScaleQuantumToAny(p->opacity,range),
- range);
+ p->opacity=SetPixelDepth(p->opacity,scale);
p++;
}
}
GetPathComponent(image->filename,RootPath,path);
GetPathComponent(image->filename,ExtensionPath,extension);
if (*extension == '\0')
- (void) FormatMagickString(filename,MaxTextExtent,"%s-%lu",
- path,(unsigned long) image->scene);
+ (void) FormatMagickString(filename,MaxTextExtent,"%s-%.20g",
+ path,(double) image->scene);
else
(void) FormatMagickString(filename,MaxTextExtent,
- "%s-%lu.%s",path,(unsigned long) image->scene,extension);
+ "%s-%.20g.%s",path,(double) image->scene,extension);
}
(void) CopyMagickString(image->filename,filename,MaxTextExtent);
#if defined(macintosh)
count=fread(magick,1,sizeof(magick),image->blob->file);
(void) rewind(image->blob->file);
(void) LogMagickEvent(BlobEvent,GetMagickModule(),
- " read %lu magic header bytes",(unsigned long) count);
+ " read %.20g magic header bytes",(double) count);
#if defined(MAGICKCORE_ZLIB_DELEGATE)
if (((int) magick[0] == 0x1F) && ((int) magick[1] == 0x8B) &&
((int) magick[2] == 0x08))
cache_info=(CacheInfo *) image->cache;
source_info=(*cache_info);
source_info.file=(-1);
- (void) FormatMagickString(cache_info->filename,MaxTextExtent,"%s[%lu]",
- image->filename,(unsigned long) GetImageIndexInList(image));
+ (void) FormatMagickString(cache_info->filename,MaxTextExtent,"%s[%.20g]",
+ image->filename,(double) GetImageIndexInList(image));
cache_info->mode=mode;
cache_info->rows=image->rows;
cache_info->columns=image->columns;
(void) FormatMagickSize(cache_info->length,MagickTrue,
format);
(void) FormatMagickString(message,MaxTextExtent,
- "open %s (%s memory, %lux%lu %sB)",cache_info->filename,
+ "open %s (%s memory, %.20gx%.20g %sB)",cache_info->filename,
cache_info->mapped != MagickFalse ? "anonymous" : "heap",
- (unsigned long) cache_info->columns,(unsigned long)
- cache_info->rows,format);
+ (double) cache_info->columns,(double) cache_info->rows,
+ format);
(void) LogMagickEvent(CacheEvent,GetMagickModule(),"%s",
message);
}
(void) FormatMagickSize(cache_info->length,MagickTrue,
format);
(void) FormatMagickString(message,MaxTextExtent,
- "open %s (%s[%d], memory-mapped, %lux%lu %sB)",
+ "open %s (%s[%d], memory-mapped, %.20gx%.20g %sB)",
cache_info->filename,cache_info->cache_filename,
- cache_info->file,(unsigned long) cache_info->columns,
- (unsigned long) cache_info->rows,format);
+ cache_info->file,(double) cache_info->columns,(double)
+ cache_info->rows,format);
(void) LogMagickEvent(CacheEvent,GetMagickModule(),"%s",
message);
}
{
(void) FormatMagickSize(cache_info->length,MagickFalse,format);
(void) FormatMagickString(message,MaxTextExtent,
- "open %s (%s[%d], disk, %lux%lu %sB)",cache_info->filename,
- cache_info->cache_filename,cache_info->file,(unsigned long)
- cache_info->columns,(unsigned long) cache_info->rows,format);
+ "open %s (%s[%d], disk, %.20gx%.20g %sB)",cache_info->filename,
+ cache_info->cache_filename,cache_info->file,(double)
+ cache_info->columns,(double) cache_info->rows,format);
(void) LogMagickEvent(CacheEvent,GetMagickModule(),"%s",message);
}
return(MagickTrue);
}
if ((cache_info->debug != MagickFalse) &&
(QuantumTick((MagickOffsetType) nexus_info->region.y,cache_info->rows) != MagickFalse))
- (void) LogMagickEvent(CacheEvent,GetMagickModule(),"%s[%lux%lu%+ld%+ld]",
- cache_info->filename,(unsigned long) nexus_info->region.width,
- (unsigned long) nexus_info->region.height,(long) nexus_info->region.x,
- (long) nexus_info->region.y);
+ (void) LogMagickEvent(CacheEvent,GetMagickModule(),
+ "%s[%.20gx%.20g%+.20gx%+.20g]",cache_info->filename,(double)
+ nexus_info->region.width,(double) nexus_info->region.height,(double)
+ nexus_info->region.x,(double) nexus_info->region.y);
return(MagickTrue);
}
\f
}
if ((cache_info->debug != MagickFalse) &&
(QuantumTick((MagickOffsetType) nexus_info->region.y,cache_info->rows) != MagickFalse))
- (void) LogMagickEvent(CacheEvent,GetMagickModule(),"%s[%lux%lu%+ld%+ld]",
- cache_info->filename,(unsigned long) nexus_info->region.width,
- (unsigned long) nexus_info->region.height,(long) nexus_info->region.x,
- (long) nexus_info->region.y);
+ (void) LogMagickEvent(CacheEvent,GetMagickModule(),
+ "%s[%.20gx%.20g%+.20gx%+.20g]",cache_info->filename,(double)
+ nexus_info->region.width,(double) nexus_info->region.height,(double)
+ nexus_info->region.x,(double) nexus_info->region.y);
return(MagickTrue);
}
\f
}
if ((cache_info->debug != MagickFalse) &&
(QuantumTick((MagickOffsetType) nexus_info->region.y,cache_info->rows) != MagickFalse))
- (void) LogMagickEvent(CacheEvent,GetMagickModule(),"%s[%lux%lu%+ld%+ld]",
- cache_info->filename,(unsigned long) nexus_info->region.width,
- (unsigned long) nexus_info->region.height,(long) nexus_info->region.x,
- (long) nexus_info->region.y);
+ (void) LogMagickEvent(CacheEvent,GetMagickModule(),
+ "%s[%.20gx%.20g%+.20gx%+.20g]",cache_info->filename,(double)
+ nexus_info->region.width,(double) nexus_info->region.height,(double)
+ nexus_info->region.x,(double) nexus_info->region.y);
return(MagickTrue);
}
\f
}
if ((cache_info->debug != MagickFalse) &&
(QuantumTick((MagickOffsetType) nexus_info->region.y,cache_info->rows) != MagickFalse))
- (void) LogMagickEvent(CacheEvent,GetMagickModule(),"%s[%lux%lu%+ld%+ld]",
- cache_info->filename,(unsigned long) nexus_info->region.width,
- (unsigned long) nexus_info->region.height,(long) nexus_info->region.x,
- (long) nexus_info->region.y);
+ (void) LogMagickEvent(CacheEvent,GetMagickModule(),
+ "%s[%.20gx%.20g%+.20gx%+.20g]",cache_info->filename,(double)
+ nexus_info->region.width,(double) nexus_info->region.height,(double)
+ nexus_info->region.x,(double) nexus_info->region.y);
return(MagickTrue);
}
char
key[MaxTextExtent];
- (void) FormatMagickString(key,MaxTextExtent,"%ld\n",(long) id);
+ (void) FormatMagickString(key,MaxTextExtent,"%.20g\n",(double) id);
return(DeleteImageRegistry(key));
}
\f
*type=UndefinedRegistryType;
*length=0;
- (void) FormatMagickString(key,MaxTextExtent,"%ld\n",(long) id);
+ (void) FormatMagickString(key,MaxTextExtent,"%.20g\n",(double) id);
blob=(void *) GetImageRegistry(ImageRegistryType,key,exception);
if (blob != (void *) NULL)
return(blob);
static ssize_t
id = 0;
- (void) FormatMagickString(key,MaxTextExtent,"%ld\n",(long) id);
+ (void) FormatMagickString(key,MaxTextExtent,"%.20g\n",(double) id);
status=SetImageRegistry(type,key,blob,exception);
if (status == MagickFalse)
return(-1);
*/
if (windows->info.mapped == MagickFalse)
(void) XMapWindow(display,windows->info.id);
- (void) FormatMagickString(text,MaxTextExtent," %lux%lu%+ld%+ld",
- (unsigned long) chop_info.width,(unsigned long) chop_info.height,
- (long) chop_info.x,(long) chop_info.y);
+ (void) FormatMagickString(text,MaxTextExtent,
+ " %.20gx%.20g%+.20gx%+.20g",(double) chop_info.width,(double)
+ chop_info.height,(double) chop_info.x,(double) chop_info.y);
XInfoWidget(display,windows,text);
XHighlightLine(display,windows->image.id,
windows->image.highlight_context,&segment_info);
height=(unsigned int) windows->image.window_changes.height;
if (image->debug != MagickFalse)
(void) LogMagickEvent(X11Event,GetMagickModule(),
- "Configure Image: %dx%d=>%lux%lu",windows->image.ximage->width,
- windows->image.ximage->height,(unsigned long) width,
- (unsigned long) height);
+ "Configure Image: %dx%d=>%.20gx%.20g",windows->image.ximage->width,
+ windows->image.ximage->height,(double) width,(double) height);
if ((width*height) == 0)
return(MagickTrue);
x=0;
*/
if (windows->info.mapped == MagickFalse)
(void) XMapWindow(display,windows->info.id);
- (void) FormatMagickString(text,MaxTextExtent," %lux%lu%+ld%+ld",
- (unsigned long) crop_info.width,(unsigned long) crop_info.height,
- (long) crop_info.x,(long) crop_info.y);
+ (void) FormatMagickString(text,MaxTextExtent,
+ " %.20gx%.20g%+.20gx%+.20g",(double) crop_info.width,(double)
+ crop_info.height,(double) crop_info.x,(double) crop_info.y);
XInfoWidget(display,windows,text);
XHighlightRectangle(display,windows->image.id,
windows->image.highlight_context,&highlight_info);
/*
Display pointer position.
*/
- (void) FormatMagickString(text,MaxTextExtent," %lux%lu%+ld%+ld",
- (unsigned long) crop_info.width,(unsigned long) crop_info.height,
- (long) crop_info.x,(long) crop_info.y);
+ (void) FormatMagickString(text,MaxTextExtent,
+ " %.20gx%.20g%+.20gx%+.20g",(double) crop_info.width,(double)
+ crop_info.height,(double) crop_info.x,(double) crop_info.y);
XInfoWidget(display,windows,text);
}
highlight_info=crop_info;
/*
Set primary selection.
*/
- (void) FormatMagickString(text,MaxTextExtent,"%lux%lu%+ld%+ld",
- (unsigned long) crop_info.width,(unsigned long) crop_info.height,
- (long) crop_info.x,(long) crop_info.y);
+ (void) FormatMagickString(text,MaxTextExtent,
+ "%.20gx%.20g%+.20gx%+.20g",(double) crop_info.width,(double)
+ crop_info.height,(double) crop_info.x,(double) crop_info.y);
request=(&(event.xselectionrequest));
(void) XChangeProperty(request->display,request->requestor,
request->property,request->target,8,PropModeReplace,
/*
Display info and draw drawing rectangle.
*/
- (void) FormatMagickString(text,MaxTextExtent," %lux%lu%+ld%+ld",
- (unsigned long) rectangle_info.width,(unsigned long)
- rectangle_info.height,(long) rectangle_info.x,
- (long) rectangle_info.y);
+ (void) FormatMagickString(text,MaxTextExtent,
+ " %.20gx%.20g%+.20gx%+.20g",(double) rectangle_info.width,
+ (double) rectangle_info.height,(double) rectangle_info.x,
+ (double) rectangle_info.y);
XInfoWidget(display,windows,text);
XHighlightRectangle(display,windows->image.id,
windows->image.highlight_context,&rectangle_info);
/*
Display info and draw drawing rectangle.
*/
- (void) FormatMagickString(text,MaxTextExtent," %lux%lu%+ld%+ld",
- (unsigned long) rectangle_info.width,(unsigned long)
- rectangle_info.height,(long) rectangle_info.x,(long)
- rectangle_info.y);
+ (void) FormatMagickString(text,MaxTextExtent,
+ " %.20gx%.20g%+.20gx%+.20g",(double) rectangle_info.width,
+ (double) rectangle_info.height,(double) rectangle_info.x,
+ (double) rectangle_info.y);
XInfoWidget(display,windows,text);
XHighlightEllipse(display,windows->image.id,
windows->image.highlight_context,&rectangle_info);
height=(size_t) windows->image.ximage->height;
x=0;
y=0;
- (void) FormatMagickString(geometry,MaxTextExtent,"%lux%lu+0+0",
- (unsigned long) width,(unsigned long) height);
+ (void) FormatMagickString(geometry,MaxTextExtent,"%.20gx%.20g+0+0",
+ (double) width,(double) height);
status=XDialogWidget(display,windows,"Resize",
"Enter resize geometry (e.g. 640x480, 200%):",geometry);
if (*geometry == '\0')
*/
if (windows->info.mapped == MagickFalse)
(void) XMapWindow(display,windows->info.id);
- (void) FormatMagickString(text,MaxTextExtent," %lux%lu%+ld%+ld",
- (unsigned long) roi_info.width,(unsigned long) roi_info.height,
- (long) roi_info.x,(long) roi_info.y);
+ (void) FormatMagickString(text,MaxTextExtent,
+ " %.20gx%.20g%+.20gx%+.20g",(double) roi_info.width,(double)
+ roi_info.height,(double) roi_info.x,(double) roi_info.y);
XInfoWidget(display,windows,text);
XHighlightRectangle(display,windows->image.id,
windows->image.highlight_context,&highlight_info);
/*
Display pointer position.
*/
- (void) FormatMagickString(text,MaxTextExtent," %lux%lu%+ld%+ld",
- (unsigned long) roi_info.width,(unsigned long) roi_info.height,
- (long) roi_info.x,(long) roi_info.y);
+ (void) FormatMagickString(text,MaxTextExtent,
+ " %.20gx%.20g%+.20gx%+.20g",(double) roi_info.width,(double)
+ roi_info.height,(double) roi_info.x,(double) roi_info.y);
XInfoWidget(display,windows,text);
}
highlight_info=roi_info;
/*
Set primary selection.
*/
- (void) FormatMagickString(text,MaxTextExtent,"%lux%lu%+ld%+ld",
- (unsigned long) roi_info.width,(unsigned long) roi_info.height,
- (long) roi_info.x,(long) roi_info.y);
+ (void) FormatMagickString(text,MaxTextExtent,
+ "%.20gx%.20g%+.20gx%+.20g",(double) roi_info.width,(double)
+ roi_info.height,(double) roi_info.x,(double) roi_info.y);
request=(&(event.xselectionrequest));
(void) XChangeProperty(request->display,request->requestor,
request->property,request->target,8,PropModeReplace,
/*
Request JPEG quality from user.
*/
- (void) FormatMagickString(quality,MaxTextExtent,"%lu",(unsigned long)
+ (void) FormatMagickString(quality,MaxTextExtent,"%.20g",(double)
image->quality);
status=XDialogWidget(display,windows,"Save","Enter JPEG quality:",
quality);
/*
Display info on cropping rectangle.
*/
- (void) FormatMagickString(text,MaxTextExtent," %lux%lu%+ld%+ld",
- (unsigned long) crop_info->width,(unsigned long) crop_info->height,
- (long) crop_info->x,
- (long) crop_info->y);
+ (void) FormatMagickString(text,MaxTextExtent," %.20gx%.20g%+.20gx%+.20g",
+ (double) crop_info->width,(double) crop_info->height,(double)
+ crop_info->x,(double) crop_info->y);
XInfoWidget(display,windows,text);
}
/*
if (image->debug != MagickFalse)
{
(void) LogMagickEvent(X11Event,GetMagickModule(),
- "Image: %s[%lu] %lux%lu ",image->filename,(unsigned long) image->scene,
- (unsigned long) image->columns,(unsigned long) image->rows);
+ "Image: %s[%.20g] %.20gx%.20g ",image->filename,(double) image->scene,
+ (double) image->columns,(double) image->rows);
if (image->colors != 0)
- (void) LogMagickEvent(X11Event,GetMagickModule(),"%luc ",
- (unsigned long) image->colors);
+ (void) LogMagickEvent(X11Event,GetMagickModule(),"%.20gc ",(double)
+ image->colors);
(void) LogMagickEvent(X11Event,GetMagickModule(),"%s",image->magick);
}
/*
if (display_image->debug != MagickFalse)
{
(void) LogMagickEvent(X11Event,GetMagickModule(),
- "Image: %s[%lu] %lux%lu ",display_image->filename,
- (unsigned long) display_image->scene,(unsigned long)
- display_image->columns,(unsigned long) display_image->rows);
+ "Image: %s[%.20g] %.20gx%.20g ",display_image->filename,
+ (double) display_image->scene,(double) display_image->columns,
+ (double) display_image->rows);
if (display_image->colors != 0)
- (void) LogMagickEvent(X11Event,GetMagickModule(),"%luc ",
- (unsigned long) display_image->colors);
+ (void) LogMagickEvent(X11Event,GetMagickModule(),"%.20gc ",(double)
+ display_image->colors);
(void) LogMagickEvent(X11Event,GetMagickModule(),"%s",
display_image->magick);
}
"%s: %s",MagickPackageName,filename);
else
(void) FormatMagickString(windows->image.name,MaxTextExtent,
- "%s: %s[%lu of %lu]",MagickPackageName,filename,(unsigned long)
- display_image->scene,(unsigned long)
- GetImageListLength(display_image));
+ "%s: %s[%.20g of %.20g]",MagickPackageName,filename,(double)
+ display_image->scene,(double) GetImageListLength(display_image));
(void) CopyMagickString(windows->image.icon_name,filename,MaxTextExtent);
}
if (resource_info->immutable)
}
if ( number_arguments < 1+i*cp_size ) {
(void) ThrowMagickException(exception,GetMagickModule(),OptionError,
- "InvalidArgument", "%s : 'require at least %ld CPs'",
- "Polynomial", (long) i);
+ "InvalidArgument", "%s : 'require at least %.20g CPs'",
+ "Polynomial", (double) i);
return((double *) NULL);
}
break;
if ( number_arguments%cp_size != 0 ||
number_arguments < cp_size ) {
(void) ThrowMagickException(exception,GetMagickModule(),OptionError,
- "InvalidArgument", "%s : 'require at least %ld CPs'",
- "Affine", 1L);
+ "InvalidArgument", "%s : 'require at least %.20g CPs'",
+ "Affine", 1.0);
coeff=(double *) RelinquishMagickMemory(coeff);
return((double *) NULL);
}
if ( number_arguments%cp_size != 0 ||
number_arguments < cp_size*4 ) {
(void) ThrowMagickException(exception,GetMagickModule(),OptionError,
- "InvalidArgument", "%s : 'require at least %ld CPs'",
- MagickOptionToMnemonic(MagickDistortOptions, *method), 4L);
+ "InvalidArgument", "%s : 'require at least %.20g CPs'",
+ MagickOptionToMnemonic(MagickDistortOptions, *method), 4.0);
coeff=(double *) RelinquishMagickMemory(coeff);
return((double *) NULL);
}
if ( number_arguments%cp_size != 0 ||
number_arguments < cp_size*4 ) {
(void) ThrowMagickException(exception,GetMagickModule(),OptionError,
- "InvalidArgument", "%s : 'require at least %ld CPs'",
- MagickOptionToMnemonic(MagickDistortOptions, *method), 4L);
+ "InvalidArgument", "%s : 'require at least %.20g CPs'",
+ MagickOptionToMnemonic(MagickDistortOptions, *method), 4.0);
coeff=(double *) RelinquishMagickMemory(coeff);
return((double *) NULL);
}
if ( number_arguments%cp_size != 0 ||
number_arguments < cp_size ) {
(void) ThrowMagickException(exception,GetMagickModule(),OptionError,
- "InvalidArgument", "%s : 'require at least %ld CPs'",
- MagickOptionToMnemonic(MagickDistortOptions, *method), 1L);
+ "InvalidArgument", "%s : 'require at least %.20g CPs'",
+ MagickOptionToMnemonic(MagickDistortOptions, *method), 1.0);
coeff=(double *) RelinquishMagickMemory(coeff);
return((double *) NULL);
}
/* Set destination image size and virtual offset */
if ( bestfit || viewport_given ) {
- (void) FormatMagickString(image_gen, MaxTextExtent," -size %lux%lu "
- "-page %+ld%+ld xc: +insert \\\n",(unsigned long) geometry.width,
- (unsigned long) geometry.height,(long) geometry.x,(long) geometry.y);
+ (void) FormatMagickString(image_gen, MaxTextExtent," -size %.20gx%.20g "
+ "-page %+.20gx%+.20g xc: +insert \\\n",(double) geometry.width,
+ (double) geometry.height,(double) geometry.x,(double) geometry.y);
lookup="v.p{ xx-v.page.x-.5, yy-v.page.x-.5 }";
}
else {
{
fprintf(stderr, "Arc Distort, Internal Coefficients:\n");
for ( i=0; i<5; i++ )
- fprintf(stderr, " c%ld = %+lf\n", (long) i, coeff[i]);
+ fprintf(stderr, " c%.20g = %+lf\n", (double) i, coeff[i]);
fprintf(stderr, "Arc Distort, FX Equivelent:\n");
fprintf(stderr, "%s", image_gen);
fprintf(stderr, " -fx 'ii=i+page.x; jj=j+page.y;\n");
{
fprintf(stderr, "Polar Distort, Internal Coefficents\n");
for ( i=0; i<8; i++ )
- fprintf(stderr, " c%ld = %+lf\n", (long) i, coeff[i]);
+ fprintf(stderr, " c%.20g = %+lf\n", (double) i, coeff[i]);
fprintf(stderr, "Polar Distort, FX Equivelent:\n");
fprintf(stderr, "%s", image_gen);
fprintf(stderr, " -fx 'ii=i+page.x%+lf; jj=j+page.y%+lf;\n",
{
fprintf(stderr, "DePolar Distort, Internal Coefficents\n");
for ( i=0; i<8; i++ )
- fprintf(stderr, " c%ld = %+lf\n", (long) i, coeff[i]);
+ fprintf(stderr, " c%.20g = %+lf\n", (double) i, coeff[i]);
fprintf(stderr, "DePolar Distort, FX Equivelent:\n");
fprintf(stderr, "%s", image_gen);
fprintf(stderr, " -fx 'aa=(i+.5)*%lf %+lf;\n", coeff[6], -coeff[4] );
p=polygon_info->edges;
for (i=0; i < (ssize_t) polygon_info->number_edges; i++)
{
- (void) LogMagickEvent(DrawEvent,GetMagickModule()," edge %lu:",
- (unsigned long) i);
+ (void) LogMagickEvent(DrawEvent,GetMagickModule()," edge %.20g:",
+ (double) i);
(void) LogMagickEvent(DrawEvent,GetMagickModule()," direction: %s",
p->direction != MagickFalse ? "down" : "up");
(void) LogMagickEvent(DrawEvent,GetMagickModule()," ghostline: %s",
(void) SetImageArtifact(image,key,token);
(void) FormatMagickString(key,MaxTextExtent,"%s-geometry",name);
(void) FormatMagickString(geometry,MaxTextExtent,
- "%lux%lu%+ld%+ld",(unsigned long) bounds.width,
- (unsigned long) bounds.height,(long) bounds.x,
- (long) bounds.y);
+ "%.20gx%.20g%+.20gx%+.20g",(double) bounds.width,(double)
+ bounds.height,(double) bounds.x,(double) bounds.y);
(void) SetImageArtifact(image,key,geometry);
GetMagickToken(q,&q,token);
break;
case PointPrimitive:
{
(void) LogMagickEvent(DrawEvent,GetMagickModule(),
- "PointPrimitive %ld,%ld %s",(long) x,(long) y,
+ "PointPrimitive %.20g,%.20g %s",(double) x,(double) y,
methods[primitive_info->method]);
return;
}
case ColorPrimitive:
{
(void) LogMagickEvent(DrawEvent,GetMagickModule(),
- "ColorPrimitive %ld,%ld %s",(long) x,(long) y,
+ "ColorPrimitive %.20g,%.20g %s",(double) x,(double) y,
methods[primitive_info->method]);
return;
}
case MattePrimitive:
{
(void) LogMagickEvent(DrawEvent,GetMagickModule(),
- "MattePrimitive %ld,%ld %s",(long) x,(long) y,
+ "MattePrimitive %.20g,%.20g %s",(double) x,(double) y,
methods[primitive_info->method]);
return;
}
case TextPrimitive:
{
(void) LogMagickEvent(DrawEvent,GetMagickModule(),
- "TextPrimitive %ld,%ld",(long) x,(long) y);
+ "TextPrimitive %.20g,%.20g",(double) x,(double) y);
return;
}
case ImagePrimitive:
{
(void) LogMagickEvent(DrawEvent,GetMagickModule(),
- "ImagePrimitive %ld,%ld",(long) x,(long) y);
+ "ImagePrimitive %.20g,%.20g",(double) x,(double) y);
return;
}
default:
{
coordinates=(ssize_t) primitive_info[i].coordinates;
(void) LogMagickEvent(DrawEvent,GetMagickModule(),
- " begin open (%ld)",(long) coordinates);
+ " begin open (%.20g)",(double) coordinates);
p=point;
}
point=primitive_info[i].point;
if ((fabs(q.x-point.x) > MagickEpsilon) ||
(fabs(q.y-point.y) > MagickEpsilon))
(void) LogMagickEvent(DrawEvent,GetMagickModule(),
- " %ld: %.18g,%.18g",(long) coordinates,point.x,point.y);
+ " %.20g: %.18g,%.18g",(double) coordinates,point.x,point.y);
else
(void) LogMagickEvent(DrawEvent,GetMagickModule(),
- " %ld: %g,%g (duplicate)",(long) coordinates,point.x,point.y);
+ " %.20g: %g,%g (duplicate)",(double) coordinates,point.x,point.y);
q=point;
coordinates--;
if (coordinates > 0)
continue;
if ((fabs(p.x-point.x) > MagickEpsilon) ||
(fabs(p.y-point.y) > MagickEpsilon))
- (void) LogMagickEvent(DrawEvent,GetMagickModule()," end last (%ld)",
- (long) coordinates);
+ (void) LogMagickEvent(DrawEvent,GetMagickModule()," end last (%.20g)",
+ (double) coordinates);
else
- (void) LogMagickEvent(DrawEvent,GetMagickModule()," end open (%ld)",
- (long) coordinates);
+ (void) LogMagickEvent(DrawEvent,GetMagickModule()," end open (%.20g)",
+ (double) coordinates);
}
}
geometry.x=x;
geometry.y=y;
(void) FormatMagickString(composite_geometry,MaxTextExtent,
- "%lux%lu%+ld%+ld",(unsigned long) composite_image->columns,
- (unsigned long) composite_image->rows,(long) geometry.x,(long)
- geometry.y);
+ "%.20gx%.20g%+.20gx%+.20g",(double) composite_image->columns,(double)
+ composite_image->rows,(double) geometry.x,(double) geometry.y);
(void) ParseGravityGeometry(image,composite_geometry,&geometry,
&image->exception);
affine=draw_info->affine;
*k;
(void) LogMagickEvent(TransformEvent,GetMagickModule(),
- " BlurImage with %lu kernel:",(unsigned long) width);
+ " BlurImage with %.20g kernel:",(double) width);
message=AcquireString("");
k=kernel;
for (i=0; i < (ssize_t) width; i++)
{
*message='\0';
- (void) FormatMagickString(format,MaxTextExtent,"%ld: ",(long) i);
+ (void) FormatMagickString(format,MaxTextExtent,"%.20g: ",(double) i);
(void) ConcatenateString(&message,format);
(void) FormatMagickString(format,MaxTextExtent,"%g ",*k++);
(void) ConcatenateString(&message,format);
*k;
(void) LogMagickEvent(TransformEvent,GetMagickModule(),
- " ConvolveImage with %lux%lu kernel:",(unsigned long) width,
- (unsigned long) width);
+ " ConvolveImage with %.20gx%.20g kernel:",(double) width,(double)
+ width);
message=AcquireString("");
k=kernel;
for (v=0; v < (ssize_t) width; v++)
{
*message='\0';
- (void) FormatMagickString(format,MaxTextExtent,"%ld: ",(long) v);
+ (void) FormatMagickString(format,MaxTextExtent,"%.20g: ",(double) v);
(void) ConcatenateString(&message,format);
for (u=0; u < (ssize_t) width; u++)
{
*k;
(void) LogMagickEvent(TransformEvent,GetMagickModule(),
- " FilterImage with %ldx%ld kernel:",(unsigned long) kernel->width,
- (unsigned long) kernel->height);
+ " FilterImage with %.20gx%.20g kernel:",(double) kernel->width,(double)
+ kernel->height);
message=AcquireString("");
k=kernel->values;
for (v=0; v < (ssize_t) kernel->height; v++)
{
*message='\0';
- (void) FormatMagickString(format,MaxTextExtent,"%ld: ",(long) v);
+ (void) FormatMagickString(format,MaxTextExtent,"%.20g: ",(double) v);
(void) ConcatenateString(&message,format);
for (u=0; u < (ssize_t) kernel->width; u++)
{
x=(ssize_t) ((i+1)*thumbnail->columns)/NumberTiles;
y=(ssize_t) ((i+1)*thumbnail->rows)/NumberTiles;
preview_image=RollImage(thumbnail,x,y,exception);
- (void) FormatMagickString(label,MaxTextExtent,"roll %ldx%ld",(long) x,
- (long) y);
+ (void) FormatMagickString(label,MaxTextExtent,"roll %+.20gx%+.20g",
+ (double) x,(double) y);
break;
}
case HuePreview:
if (preview_image != (Image *) NULL)
for (x=0; x < i; x++)
(void) ContrastImage(preview_image,MagickTrue);
- (void) FormatMagickString(label,MaxTextExtent,"contrast (%ld)",(long)
- i+1);
+ (void) FormatMagickString(label,MaxTextExtent,"contrast (%.20g)",
+ (double) i+1);
break;
}
case DullPreview:
break;
for (x=0; x < i; x++)
(void) ContrastImage(preview_image,MagickFalse);
- (void) FormatMagickString(label,MaxTextExtent,"+contrast (%ld)",
- (long) i+1);
+ (void) FormatMagickString(label,MaxTextExtent,"+contrast (%.20g)",
+ (double) i+1);
break;
}
case GrayscalePreview:
quantize_info.colorspace=GRAYColorspace;
(void) QuantizeImage(&quantize_info,preview_image);
(void) FormatMagickString(label,MaxTextExtent,
- "-colorspace gray -colors %lu",(unsigned long) colors);
+ "-colorspace gray -colors %.20g",(double) colors);
break;
}
case QuantizePreview:
colors<<=1;
quantize_info.number_colors=colors;
(void) QuantizeImage(&quantize_info,preview_image);
- (void) FormatMagickString(label,MaxTextExtent,"colors %lu",
- (unsigned long) colors);
+ (void) FormatMagickString(label,MaxTextExtent,"colors %.20g",(double)
+ colors);
break;
}
case DespecklePreview:
preview_image=DespeckleImage(thumbnail,exception);
if (preview_image == (Image *) NULL)
break;
- (void) FormatMagickString(label,MaxTextExtent,"despeckle (%ld)",(long)
- i+1);
+ (void) FormatMagickString(label,MaxTextExtent,"despeckle (%.20g)",
+ (double) i+1);
break;
}
case ReduceNoisePreview:
geometry.x=i/2;
geometry.y=i/2;
(void) RaiseImage(preview_image,&geometry,MagickTrue);
- (void) FormatMagickString(label,MaxTextExtent,"raise %lux%lu%+ld%+ld",
- (unsigned long) geometry.width,(unsigned long) geometry.height,
- (long) geometry.x,(long) geometry.y);
+ (void) FormatMagickString(label,MaxTextExtent,
+ "raise %.20gx%.20g%+.20gx%+.20g",(double) geometry.width,(double)
+ geometry.height,(double) geometry.x,(double) geometry.y);
break;
}
case SegmentPreview:
if (preview_image == (Image *) NULL)
break;
preview_info->quality=(size_t) percentage;
- (void) FormatMagickString(factor,MaxTextExtent,"%lu",
- (unsigned long) preview_info->quality);
+ (void) FormatMagickString(factor,MaxTextExtent,"%.20g",(double)
+ preview_info->quality);
file=AcquireUniqueFileResource(filename);
if (file != -1)
file=close(file)-1;
"quality %s\n%gkb ",factor,(double) ((MagickOffsetType)
GetBlobSize(preview_image))/1024.0);
else
- (void) FormatMagickString(label,MaxTextExtent,"quality %s\n%lub ",
- factor,(unsigned long) GetBlobSize(thumbnail));
+ (void) FormatMagickString(label,MaxTextExtent,"quality %s\n%.20gb ",
+ factor,(double) GetBlobSize(thumbnail));
break;
}
}
*k;
(void) LogMagickEvent(TransformEvent,GetMagickModule(),
- " SelectiveBlurImage with %lux%lu kernel:",(unsigned long) width,
- (unsigned long) width);
+ " SelectiveBlurImage with %.20gx%.20g kernel:",(double) width,(double)
+ width);
message=AcquireString("");
k=kernel;
for (v=0; v < (ssize_t) width; v++)
{
*message='\0';
- (void) FormatMagickString(format,MaxTextExtent,"%ld: ",(long) v);
+ (void) FormatMagickString(format,MaxTextExtent,"%.20g: ",(double) v);
(void) ConcatenateString(&message,format);
for (u=0; u < (ssize_t) width; u++)
{
type="error";
if (severity >= FatalErrorException)
type="fatal";
- (void) FormatMagickString(message,MaxTextExtent,"%s @ %s/%s/%s/%lu",reason,
- type,path,function,(unsigned long) line);
+ (void) FormatMagickString(message,MaxTextExtent,"%s @ %s/%s/%s/%.20g",reason,
+ type,path,function,(double) line);
(void) ThrowException(exception,severity,message,(char *) NULL);
return(status);
}
for (v=0; v < 6; v++)
{
*message='\0';
- (void) FormatMagickString(format,MaxTextExtent,"%ld: ",(long) v);
+ (void) FormatMagickString(format,MaxTextExtent,"%.20g: ",(double) v);
(void) ConcatenateString(&message,format);
for (u=0; u < 6; u++)
{
case 'k': channel=BlackChannel; break;
default: break;
}
- (void) FormatMagickString(key,MaxTextExtent,"%p.%ld.%s",(void *) image,
- (long) channel,symbol);
+ (void) FormatMagickString(key,MaxTextExtent,"%p.%.20g.%s",(void *) image,
+ (double) channel,symbol);
value=(const char *) GetValueFromSplayTree(fx_info->symbols,key);
if (value != (const char *) NULL)
return(QuantumScale*StringToDouble(value));
depth;
depth=GetImageChannelDepth(image,channel,exception);
- (void) FormatMagickString(statistic,MaxTextExtent,"%lu",
- (unsigned long) depth);
+ (void) FormatMagickString(statistic,MaxTextExtent,"%.20g",(double)
+ depth);
}
if (LocaleNCompare(symbol,"kurtosis",8) == 0)
{
if (strlen(subexpression) > 1)
subexpression[strlen(subexpression)-1]='\0';
if (fx_info->file != (FILE *) NULL)
- (void) fprintf(fx_info->file,"%s[%ld,%ld].%s: %s=%.*g\n",
- fx_info->images->filename,(long) x,(long) y,type,subexpression,
- GetMagickPrecision(),(double) alpha);
+ (void) fprintf(fx_info->file,"%s[%.20g,%.20g].%s: %s=%.*g\n",
+ fx_info->images->filename,(double) x,(double) y,type,
+ subexpression,GetMagickPrecision(),(double) alpha);
return(0.0);
}
break;
(image->scene == 0))
(void) fprintf(file,"%s ",image->filename);
else
- (void) fprintf(file,"%s[%lu] ",image->filename,(unsigned long)
- image->scene);
+ (void) fprintf(file,"%s[%.20g] ",image->filename,(double) image->scene);
(void) fprintf(file,"%s ",image->magick);
if ((image->magick_columns != 0) || (image->magick_rows != 0))
if ((image->magick_columns != image->columns) ||
(image->magick_rows != image->rows))
- (void) fprintf(file,"%lux%lu=>",(unsigned long) image->magick_columns,
- (unsigned long) image->magick_rows);
- (void) fprintf(file,"%lux%lu ",(unsigned long) image->columns,
- (unsigned long) image->rows);
+ (void) fprintf(file,"%.20gx%.20g=>",(double) image->magick_columns,
+ (double) image->magick_rows);
+ (void) fprintf(file,"%.20gx%.20g ",(double) image->columns,(double)
+ image->rows);
if ((image->page.width != 0) || (image->page.height != 0) ||
(image->page.x != 0) || (image->page.y != 0))
- (void) fprintf(file,"%lux%lu%+ld%+ld ",(unsigned long)
- image->page.width,(unsigned long) image->page.height,(long)
- image->page.x,(long) image->page.y);
- (void) fprintf(file,"%lu-bit ",(unsigned long) image->depth);
+ (void) fprintf(file,"%.20gx%.20g%+.20gx%+.20g ",(double)
+ image->page.width,(double) image->page.height,(double) image->page.x,
+ (double) image->page.y);
+ (void) fprintf(file,"%.20g-bit ",(double) image->depth);
if (image->type != UndefinedType)
(void) fprintf(file,"%s ",MagickOptionToMnemonic(MagickTypeOptions,
(ssize_t) image->type));
}
else
if (image->total_colors <= image->colors)
- (void) fprintf(file,"PseudoClass %luc ",(unsigned long)
- image->colors);
+ (void) fprintf(file,"PseudoClass %.20gc ",(double) image->colors);
else
- (void) fprintf(file,"PseudoClass %lu=>%luc ",(unsigned long)
- image->total_colors,(unsigned long) image->colors);
+ (void) fprintf(file,"PseudoClass %.20g=>%.20gc ",(double)
+ image->total_colors,(double) image->colors);
if (image->error.mean_error_per_pixel != 0.0)
- (void) fprintf(file,"%ld/%f/%fdb ",(long)
+ (void) fprintf(file,"%.20g/%f/%fdb ",(double)
(image->error.mean_error_per_pixel+0.5),
image->error.normalized_mean_error,
image->error.normalized_maximum_error);
(void) FormatMagickSize(GetBlobSize(image),MagickFalse,format);
(void) fprintf(file,"%sB ",format);
}
- (void) fprintf(file,"%0.3fu %ld:%02ld.%03ld",user_time,(long)
- (elapsed_time/60.0),(long) floor(fmod(elapsed_time,60.0)),
- (long) (1000.0*(elapsed_time-floor(elapsed_time))));
+ (void) fprintf(file,"%0.3fu %.20g:%02g.%03g",user_time,(double)
+ (elapsed_time/60.0),floor(fmod(elapsed_time,60.0)),
+ (double) (1000.0*(elapsed_time-floor(elapsed_time))));
(void) fprintf(file,"\n");
(void) fflush(file);
return(ferror(file) != 0 ? MagickFalse : MagickTrue);
GetMagickDescription(magick_info));
(void) fprintf(file," Class: %s\n",MagickOptionToMnemonic(MagickClassOptions,
(ssize_t) image->storage_class));
- (void) fprintf(file," Geometry: %lux%lu%+ld%+ld\n",(unsigned long)
- image->columns,(unsigned long) image->rows,(long) image->tile_offset.x,
- (long) image->tile_offset.y);
+ (void) fprintf(file," Geometry: %.20gx%.20g%+.20gx%+.20g\n",(double)
+ image->columns,(double) image->rows,(double) image->tile_offset.x,(double)
+ image->tile_offset.y);
if ((image->magick_columns != 0) || (image->magick_rows != 0))
if ((image->magick_columns != image->columns) ||
(image->magick_rows != image->rows))
- (void) fprintf(file," Base geometry: %lux%lu\n",(unsigned long)
- image->magick_columns,(unsigned long) image->magick_rows);
+ (void) fprintf(file," Base geometry: %.20gx%.20g\n",(double)
+ image->magick_columns,(double) image->magick_rows);
if ((image->x_resolution != 0.0) && (image->y_resolution != 0.0))
{
(void) fprintf(file," Resolution: %gx%g\n",image->x_resolution,
}
depth=GetImageDepth(image,&image->exception);
if (image->depth == depth)
- (void) fprintf(file," Depth: %lu-bit\n",(unsigned long) image->depth);
+ (void) fprintf(file," Depth: %.20g-bit\n",(double) image->depth);
else
- (void) fprintf(file," Depth: %lu/%lu-bit\n",(unsigned long)
- image->depth,(unsigned long) depth);
+ (void) fprintf(file," Depth: %.20g/%.20g-bit\n",(double)
+ image->depth,(double) depth);
(void) fprintf(file," Channel depth:\n");
if (IsGrayImage(image,&image->exception) != MagickFalse)
colorspace=GRAYColorspace;
case RGBColorspace:
default:
{
- (void) fprintf(file," red: %lu-bit\n",
- (unsigned long) channel_statistics[RedChannel].depth);
- (void) fprintf(file," green: %lu-bit\n",
- (unsigned long) channel_statistics[GreenChannel].depth);
- (void) fprintf(file," blue: %lu-bit\n",
- (unsigned long) channel_statistics[BlueChannel].depth);
- if (image->matte != MagickFalse)
- (void) fprintf(file," alpha: %lu-bit\n",
- (unsigned long) channel_statistics[OpacityChannel].depth);
+ (void) fprintf(file," red: %.20g-bit\n",(double)
+ channel_statistics[RedChannel].depth);
+ (void) fprintf(file," green: %.20g-bit\n",(double)
+ channel_statistics[GreenChannel].depth);
+ (void) fprintf(file," blue: %.20g-bit\n",(double)
+ channel_statistics[BlueChannel].depth);
break;
}
case CMYKColorspace:
{
- (void) fprintf(file," cyan: %lu-bit\n",
- (unsigned long) channel_statistics[CyanChannel].depth);
- (void) fprintf(file," magenta: %lu-bit\n",
- (unsigned long) channel_statistics[MagentaChannel].depth);
- (void) fprintf(file," yellow: %lu-bit\n",
- (unsigned long) channel_statistics[YellowChannel].depth);
- (void) fprintf(file," black: %lu-bit\n",
- (unsigned long) channel_statistics[BlackChannel].depth);
- if (image->matte != MagickFalse)
- (void) fprintf(file," alpha: %lu-bit\n",
- (unsigned long) channel_statistics[OpacityChannel].depth);
+ (void) fprintf(file," cyan: %.20g-bit\n",(double)
+ channel_statistics[CyanChannel].depth);
+ (void) fprintf(file," magenta: %.20g-bit\n",(double)
+ channel_statistics[MagentaChannel].depth);
+ (void) fprintf(file," yellow: %.20g-bit\n",(double)
+ channel_statistics[YellowChannel].depth);
+ (void) fprintf(file," black: %.20g-bit\n",(double)
+ channel_statistics[BlackChannel].depth);
break;
}
case GRAYColorspace:
{
- (void) fprintf(file," gray: %lu-bit\n",
- (unsigned long) channel_statistics[GrayChannel].depth);
- if (image->matte != MagickFalse)
- (void) fprintf(file," alpha: %lu-bit\n",
- (unsigned long) channel_statistics[OpacityChannel].depth);
+ (void) fprintf(file," gray: %.20g-bit\n",(double)
+ channel_statistics[GrayChannel].depth);
break;
}
}
+ if (image->matte != MagickFalse)
+ (void) fprintf(file," alpha: %.20g-bit\n",(double)
+ channel_statistics[OpacityChannel].depth);
scale=1;
if (image->depth <= MAGICKCORE_QUANTUM_DEPTH)
scale=QuantumRange/((size_t) QuantumRange >> ((size_t)
artifact=GetImageArtifact(image,"identify:unique-colors");
if ((artifact != (const char *) NULL) &&
(IsMagickTrue(artifact) != MagickFalse))
- (void) fprintf(file," Colors: %lu\n",(unsigned long)
+ (void) fprintf(file," Colors: %.20g\n",(double)
GetNumberColors(image,(FILE *) NULL,&image->exception));
if (IsHistogramImage(image,&image->exception) != MagickFalse)
{
}
if (image->storage_class == PseudoClass)
{
- (void) fprintf(file," Colormap: %lu\n",(unsigned long) image->colors);
+ (void) fprintf(file," Colormap: %.20g\n",(double) image->colors);
if (image->colors <= 1024)
{
char
image->chromaticity.white_point.x,image->chromaticity.white_point.y);
}
if ((image->extract_info.width*image->extract_info.height) != 0)
- (void) fprintf(file," Tile geometry: %lux%lu%+ld%+ld\n",(unsigned long)
- image->extract_info.width,(unsigned long) image->extract_info.height,
- (long) image->extract_info.x,(long) image->extract_info.y);
+ (void) fprintf(file," Tile geometry: %.20gx%.20g%+.20gx%+.20g\n",(double)
+ image->extract_info.width,(double) image->extract_info.height,(double)
+ image->extract_info.x,(double) image->extract_info.y);
(void) fprintf(file," Interlace: %s\n",MagickOptionToMnemonic(
MagickInterlaceOptions,(ssize_t) image->interlace));
(void) QueryColorname(image,&image->background_color,SVGCompliance,color,
MagickComposeOptions,(ssize_t) image->compose));
if ((image->page.width != 0) || (image->page.height != 0) ||
(image->page.x != 0) || (image->page.y != 0))
- (void) fprintf(file," Page geometry: %lux%lu%+ld%+ld\n",(unsigned long)
- image->page.width,(unsigned long) image->page.height,(long)
- image->page.x,(long) image->page.y);
+ (void) fprintf(file," Page geometry: %.20gx%.20g%+.20gx%+.20g\n",(double)
+ image->page.width,(double) image->page.height,(double)
+ image->page.x,(double) image->page.y);
if ((image->page.x != 0) || (image->page.y != 0))
- (void) fprintf(file," Origin geometry: %+ld%+ld\n",(long) image->page.x,
- (long) image->page.y);
+ (void) fprintf(file," Origin geometry: %+.20gx%+.20g\n",(double)
+ image->page.x,(double) image->page.y);
(void) fprintf(file," Dispose: %s\n",MagickOptionToMnemonic(
MagickDisposeOptions,(ssize_t) image->dispose));
if (image->delay != 0)
- (void) fprintf(file," Delay: %lux%ld\n",(unsigned long) image->delay,
- (long) image->ticks_per_second);
+ (void) fprintf(file," Delay: %.20gx%.20g\n",(double) image->delay,
+ (double) image->ticks_per_second);
if (image->iterations != 1)
- (void) fprintf(file," Iterations: %lu\n",(unsigned long)
- image->iterations);
+ (void) fprintf(file," Iterations: %.20g\n",(double) image->iterations);
if ((image->next != (Image *) NULL) || (image->previous != (Image *) NULL))
- (void) fprintf(file," Scene: %lu of %lu\n",(unsigned long) image->scene,
- (unsigned long) GetImageListLength(image));
+ (void) fprintf(file," Scene: %.20g of %.20g\n",(double) image->scene,
+ (double) GetImageListLength(image));
else
if (image->scene != 0)
- (void) fprintf(file," Scene: %lu\n",(unsigned long) image->scene);
+ (void) fprintf(file," Scene: %.20g\n",(double) image->scene);
(void) fprintf(file," Compression: %s\n",MagickOptionToMnemonic(
MagickCompressOptions,(ssize_t) image->compression));
if (image->quality != UndefinedCompressionQuality)
- (void) fprintf(file," Quality: %lu\n",(unsigned long) image->quality);
+ (void) fprintf(file," Quality: %.20g\n",(double) image->quality);
(void) fprintf(file," Orientation: %s\n",MagickOptionToMnemonic(
MagickOrientationOptions,(ssize_t) image->orientation));
if (image->montage != (char *) NULL)
(void) fprintf(file,"\n");
continue;
}
- (void) fprintf(file," %lux%lu %s\n",(unsigned long)
- tile->magick_columns,(unsigned long) tile->magick_rows,tile->magick);
+ (void) fprintf(file," %.20gx%.20g %s\n",(double) tile->magick_columns,
+ (double) tile->magick_rows,tile->magick);
(void) SignatureImage(tile);
ResetImagePropertyIterator(tile);
property=GetNextImageProperty(tile);
profile=GetImageProfile(image,name);
if (profile == (StringInfo *) NULL)
continue;
- (void) fprintf(file," Profile-%s: %lu bytes\n",name,(unsigned long)
+ (void) fprintf(file," Profile-%s: %.20g bytes\n",name,(double)
GetStringInfoLength(profile));
#if defined(MAGICKCORE_LCMS_DELEGATE)
if ((LocaleCompare(name,"icc") == 0) ||
case 219: tag="Custom Field 20"; break;
default: tag="unknown"; break;
}
- (void) fprintf(file," %s[%ld,%ld]: ",tag,dataset,record);
+ (void) fprintf(file," %s[%.20g,%.20g]: ",tag,(double)
+ dataset,(double) record);
length=(size_t) (GetStringInfoDatum(profile)[i++] << 8);
length|=GetStringInfoDatum(profile)[i++];
attribute=(char *) NULL;
elapsed_time+0.5),MagickFalse,format);
(void) fprintf(file," Pixels per second: %s\n",format);
(void) fprintf(file," User time: %0.3fu\n",user_time);
- (void) fprintf(file," Elapsed time: %ld:%02ld.%03ld\n",(long)
- (elapsed_time/60.0),(long) ceil(fmod(elapsed_time,60.0)),(long)
+ (void) fprintf(file," Elapsed time: %.20g:%02g.%03g\n",(double)
+ (elapsed_time/60.0),ceil(fmod(elapsed_time,60.0)),(double)
(1000.0*(elapsed_time-floor(elapsed_time))));
(void) fprintf(file," Version: %s\n",GetMagickVersion((size_t *)
NULL));
while ( next != (const Image *) NULL )
{
#if 0 /* For debuging */
- printf("image %ld :- %d %ldx%ld%+ld%+ld\n", i, disposals[i],
- bounds[i].width, bounds[i].height, bounds[i].x, bounds[i].y );
+ printf("image %.20g :- %.20g %.20gx%.20g%+.20gx%+.20g\n", (double) i,
+ (double) disposals[i],(double) bounds[i].width,(double)
+ bounds[i].height,(double) bounds[i].x,(double) bounds[i].y );
#endif
prev_image=CloneImage(next,0,0,MagickTrue,exception);
if (prev_image == (Image *) NULL)
(void) FormatMagickString(text,extent,
"<entry>\n"
" <timestamp>%s</timestamp>\n"
- " <elapsed-time>%ld:%02ld.%03ld</elapsed-time>\n"
+ " <elapsed-time>%.20g:%02g.%03g</elapsed-time>\n"
" <user-time>%0.3f</user-time>\n"
- " <process-id>%ld</process-id>\n"
- " <thread-id>%lu</thread-id>\n"
+ " <process-id>%.20g</process-id>\n"
+ " <thread-id>%.20g</thread-id>\n"
" <module>%s</module>\n"
" <function>%s</function>\n"
- " <line>%lu</line>\n"
+ " <line>%.20g</line>\n"
" <domain>%s</domain>\n"
" <event>%s</event>\n"
- "</entry>",timestamp,(long) (elapsed_time/60.0),(long)
- floor(fmod(elapsed_time,60.0)),(long) (1000.0*(elapsed_time-
- floor(elapsed_time))+0.5),user_time,(long) getpid(),
- (unsigned long) GetMagickThreadSignature(),module,function,
- (unsigned long) line, domain,event);
+ "</entry>",timestamp,(double) (elapsed_time/60.0),
+ floor(fmod(elapsed_time,60.0)),(double) (1000.0*(elapsed_time-
+ floor(elapsed_time))+0.5),user_time,(double) getpid(),(double)
+ GetMagickThreadSignature(),module,function,(double) line,domain,event);
return(text);
}
/*
q++;
break;
}
- q+=FormatMagickString(q,extent,"%lu",(unsigned long)
- (log_info->generation % log_info->generations));
+ q+=FormatMagickString(q,extent,"%.20g",(double) (log_info->generation %
+ log_info->generations));
break;
}
case 'l':
{
- q+=FormatMagickString(q,extent,"%lu",(unsigned long) line);
+ q+=FormatMagickString(q,extent,"%.20g",(double) line);
break;
}
case 'm':
}
case 'p':
{
- q+=FormatMagickString(q,extent,"%ld",(long) getpid());
+ q+=FormatMagickString(q,extent,"%.20g",(double) getpid());
break;
}
case 'r':
{
- q+=FormatMagickString(q,extent,"%ld:%02ld.%03ld",(long)
- (elapsed_time/60.0),(long) floor(fmod(elapsed_time,60.0)),
- (long) (1000.0*(elapsed_time-floor(elapsed_time))+0.5));
+ q+=FormatMagickString(q,extent,"%.20g:%02g.%03g",(double)
+ (elapsed_time/60.0),floor(fmod(elapsed_time,60.0)),(double)
+ (1000.0*(elapsed_time-floor(elapsed_time))+0.5));
break;
}
case 't':
q++;
break;
}
- q+=FormatMagickString(q,extent,"%lu",(unsigned long)
- (log_info->generation % log_info->generations));
+ q+=FormatMagickString(q,extent,"%.20g",(double) (log_info->generation %
+ log_info->generations));
break;
}
case 'n':
}
case 'p':
{
- q+=FormatMagickString(q,extent,"%ld",(long) getpid());
+ q+=FormatMagickString(q,extent,"%.20g",(double) getpid());
break;
}
case 'v':
#include "magick/exception.h"
#if !defined(GetMagickModule)
-# define GetMagickModule() __FILE__,__func__,(unsigned long) __LINE__
+# define GetMagickModule() __FILE__,__func__,(size_t) __LINE__
#endif
#define MagickLogFilename "log.xml"
GetMontageGeometry(montage_info->tile,number_images,&x_offset,&y_offset,
&sans,&sans);
y_offset+=(ssize_t) title_offset;
- (void) FormatMagickString(montage->montage,MaxTextExtent,"%ldx%ld%+ld%+ld",
- (long) (extract_info.width+(extract_info.x+border_width)*2),
- (long) (extract_info.height+(extract_info.y+border_width)*2+
- (long) ((metrics.ascent-metrics.descent+4)*number_lines+
- (montage_info->shadow != MagickFalse ? 4 : 0))),(long) x_offset,
- (long) y_offset);
+ (void) FormatMagickString(montage->montage,MaxTextExtent,
+ "%.20gx%.20g%+.20gx%+.20g",(double) (extract_info.width+
+ (extract_info.x+border_width)*2),(double) (extract_info.height+
+ (extract_info.y+border_width)*2+(double) ((metrics.ascent-
+ metrics.descent+4)*number_lines+(montage_info->shadow != MagickFalse ? 4 :
+ 0))),(double) x_offset,(double) y_offset);
*montage->directory='\0';
tile=0;
while (tile < MagickMin((ssize_t) tiles_per_page,(ssize_t) number_images))
clone_info->gravity=CenterGravity;
clone_info->pointsize*=2.0;
(void) GetTypeMetrics(image_list[0],clone_info,&metrics);
- (void) FormatMagickString(geometry,MaxTextExtent,"%lux%lu%+ld%+ld",
- (unsigned long) montage->columns,(unsigned long) (metrics.ascent-
- metrics.descent),0L,(long) extract_info.y+4);
+ (void) FormatMagickString(geometry,MaxTextExtent,
+ "%.20gx%.20g%+.20gx%+.20g",(double) montage->columns,(double)
+ (metrics.ascent-metrics.descent),0.0,(double) extract_info.y+4);
(void) CloneString(&clone_info->geometry,geometry);
(void) CloneString(&clone_info->text,title);
(void) AnnotateImage(montage,clone_info);
tile_image->gravity=montage_info->gravity;
if (image->gravity != UndefinedGravity)
tile_image->gravity=image->gravity;
- (void) FormatMagickString(tile_geometry,MaxTextExtent,"%lux%lu+0+0",
- (unsigned long) image->columns,(unsigned long) image->rows);
+ (void) FormatMagickString(tile_geometry,MaxTextExtent,"%.20gx%.20g+0+0",
+ (double) image->columns,(double) image->rows);
flags=ParseGravityGeometry(tile_image,tile_geometry,&geometry,exception);
x=(ssize_t) (geometry.x+border_width);
y=(ssize_t) (geometry.y+border_width);
Annotate composite tile with label.
*/
(void) FormatMagickString(geometry,MaxTextExtent,
- "%lux%lu%+ld%+ld",(unsigned long) ((montage_info->frame ?
- image->columns : width)-2*border_width),(unsigned long)
+ "%.20gx%.20g%+.20gx%+.20g",(double) ((montage_info->frame ?
+ image->columns : width)-2*border_width),(double)
(metrics.ascent-metrics.descent+4)*MultilineCensus(value),
- (long) (x_offset+border_width),(long) ((montage_info->frame ?
- y_offset+height+border_width+4 : y_offset+extract_info.height+
- border_width+(montage_info->shadow != MagickFalse ? 4 : 0))+
- bevel_width));
+ (double) (x_offset+border_width),(double)
+ ((montage_info->frame ? y_offset+height+border_width+4 :
+ y_offset+extract_info.height+border_width+
+ (montage_info->shadow != MagickFalse ? 4 : 0))+bevel_width));
(void) CloneString(&draw_info->geometry,geometry);
(void) CloneString(&draw_info->text,value);
(void) AnnotateImage(montage,draw_info);
/* Error handling -- this is not proper error handling! */
if ( new_kernel == (KernelInfo *) NULL ) {
- fprintf(stderr, "Failed to parse kernel number #%lu\n",(unsigned long)
+ fprintf(stderr, "Failed to parse kernel number #%.20g\n",(double)
kernel_number);
if ( kernel != (KernelInfo *) NULL )
kernel=DestroyKernelInfo(kernel);
/* Extra information for debugging compound operations */
if ( verbose == MagickTrue ) {
if ( stage_limit > 1 )
- (void) FormatMagickString(v_info, MaxTextExtent, "%s:%lu.%lu -> ",
- MagickOptionToMnemonic(MagickMorphologyOptions, method),
- (unsigned long) method_loop,(unsigned long) stage_loop);
+ (void) FormatMagickString(v_info,MaxTextExtent,"%s:%.20g.%.20g -> ",
+ MagickOptionToMnemonic(MagickMorphologyOptions,method),(double)
+ method_loop,(double) stage_loop);
else if ( primative != method )
- (void) FormatMagickString(v_info, MaxTextExtent, "%s:%lu -> ",
- MagickOptionToMnemonic(MagickMorphologyOptions, method),
- (unsigned long) method_loop);
+ (void) FormatMagickString(v_info, MaxTextExtent, "%s:%.20g -> ",
+ MagickOptionToMnemonic(MagickMorphologyOptions, method),(double)
+ method_loop);
else
v_info[0] = '\0';
}
if ( verbose == MagickTrue ) {
if ( kernel_loop > 1 )
fprintf(stderr, "\n"); /* add end-of-line from previous */
- fprintf(stderr, "%s%s%s:%lu.%lu #%lu => Changed %lu", v_info,
- MagickOptionToMnemonic(MagickMorphologyOptions, primative),
- ( this_kernel == rflt_kernel ) ? "*" : "",
- (unsigned long) method_loop+kernel_loop-1,(unsigned long)
- kernel_number,(unsigned long) count,(unsigned long) changed);
+ (void) fprintf(stderr, "%s%s%s:%.20g.%.20g #%.20g => Changed %.20g",
+ v_info,MagickOptionToMnemonic(MagickMorphologyOptions,
+ primative),(this_kernel == rflt_kernel ) ? "*" : "",
+ (double) (method_loop+kernel_loop-1),(double) kernel_number,
+ (double) count,(double) changed);
}
/* prepare next loop */
{ Image *tmp = work_image; /* swap images for iteration */
} /* End Loop 4: Iterate the kernel with primative */
if ( verbose == MagickTrue && kernel_changed != changed )
- fprintf(stderr, " Total %lu",(unsigned long) kernel_changed);
+ fprintf(stderr, " Total %.20g",(double) kernel_changed);
if ( verbose == MagickTrue && stage_loop < stage_limit )
fprintf(stderr, "\n"); /* add end-of-line before looping */
case EXIF_FMT_BYTE:
case EXIF_FMT_UNDEFINED:
{
- EXIFMultipleValues(1,"%lu",(unsigned long)
+ EXIFMultipleValues(1,"%.20g",(double)
(*(unsigned char *) p1));
break;
}
case EXIF_FMT_SBYTE:
{
- EXIFMultipleValues(1,"%ld",(long) (*(signed char *) p1));
+ EXIFMultipleValues(1,"%.20g",(double) (*(signed char *) p1));
break;
}
case EXIF_FMT_SSHORT:
}
case EXIF_FMT_ULONG:
{
- EXIFMultipleValues(4,"%lu",(long) ReadPropertyLong(endian,p1));
+ EXIFMultipleValues(4,"%.20g",(double)
+ ReadPropertyLong(endian,p1));
break;
}
case EXIF_FMT_SLONG:
{
- EXIFMultipleValues(4,"%ld",(long) ReadPropertyLong(endian,p1));
+ EXIFMultipleValues(4,"%.20g",(double)
+ ReadPropertyLong(endian,p1));
break;
}
case EXIF_FMT_URATIONAL:
{
- EXIFMultipleFractions(8,"%ld/%ld",(long)
- ReadPropertyLong(endian,p1),(long)
+ EXIFMultipleFractions(8,"%.20g/%.20g",(double)
+ ReadPropertyLong(endian,p1),(double)
ReadPropertyLong(endian,p1+4));
break;
}
case EXIF_FMT_SRATIONAL:
{
- EXIFMultipleFractions(8,"%ld/%ld",(long)
- ReadPropertyLong(endian,p1),(long)
+ EXIFMultipleFractions(8,"%.20g/%.20g",(double)
+ ReadPropertyLong(endian,p1),(double)
ReadPropertyLong(endian,p1+4));
break;
}
"<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>\n");
(void) ConcatenateString(&path,message);
(void) FormatMagickString(message,MaxTextExtent,
- "<svg width=\"%lu\" height=\"%lu\">\n",(unsigned long) columns,
- (unsigned long) rows);
+ "<svg width=\"%.20g\" height=\"%.20g\">\n",(double) columns,(double) rows);
(void) ConcatenateString(&path,message);
(void) FormatMagickString(message,MaxTextExtent,"<g>\n");
(void) ConcatenateString(&path,message);
{
if (LocaleNCompare("depth",property,5) == 0)
{
- (void) FormatMagickString(value,MaxTextExtent,"%lu",(unsigned long)
+ (void) FormatMagickString(value,MaxTextExtent,"%.20g",(double)
image->depth);
break;
}
{
if (LocaleNCompare("height",property,6) == 0)
{
- (void) FormatMagickString(value,MaxTextExtent,"%lu",
- image->magick_rows != 0 ? image->magick_rows : 256UL);
+ (void) FormatMagickString(value,MaxTextExtent,"%.20g",
+ image->magick_rows != 0 ? (double) image->magick_rows : 256.0);
break;
}
break;
p=image;
for (page=1; GetPreviousImageInList(p) != (Image *) NULL; page++)
p=GetPreviousImageInList(p);
- (void) FormatMagickString(value,MaxTextExtent,"%lu",(unsigned long)
+ (void) FormatMagickString(value,MaxTextExtent,"%.20g",(double)
page);
break;
}
}
if (LocaleNCompare("scenes",property,6) == 0)
{
- (void) FormatMagickString(value,MaxTextExtent,"%lu",
- (unsigned long) GetImageListLength(image));
+ (void) FormatMagickString(value,MaxTextExtent,"%.20g",(double)
+ GetImageListLength(image));
break;
}
if (LocaleNCompare("scene",property,5) == 0)
{
- (void) FormatMagickString(value,MaxTextExtent,"%lu",(unsigned long)
+ (void) FormatMagickString(value,MaxTextExtent,"%.20g",(double)
image->scene);
if (image_info->number_scenes != 0)
- (void) FormatMagickString(value,MaxTextExtent,"%lu",
- (unsigned long) image_info->scene);
+ (void) FormatMagickString(value,MaxTextExtent,"%.20g",(double)
+ image_info->scene);
break;
}
if (LocaleNCompare("skewness",property,8) == 0)
{
if (LocaleNCompare("width",property,5) == 0)
{
- (void) FormatMagickString(value,MaxTextExtent,"%lu",(unsigned long)
+ (void) FormatMagickString(value,MaxTextExtent,"%.20g",(double)
(image->magick_columns != 0 ? image->magick_columns : 256));
break;
}
/*
File size.
*/
- (void) FormatMagickString(format,MaxTextExtent,"%lu",(unsigned long)
+ (void) FormatMagickString(format,MaxTextExtent,"%.20g",(double)
image->extent);
if (image->extent != (MagickSizeType) ((size_t) image->extent))
(void) FormatMagickSize(image->extent,MagickFalse,format);
/*
Image geometry.
*/
- q+=FormatMagickString(q,extent,"%lux%lu%+ld%+ld",(unsigned long)
- image->page.width,(unsigned long) image->page.height,(long)
- image->page.x,(long) image->page.y);
+ q+=FormatMagickString(q,extent,"%.20gx%.20g%+.20gx%+.20g",(double)
+ image->page.width,(double) image->page.height,(double)
+ image->page.x,(double) image->page.y);
break;
}
case 'h':
/*
Image height.
*/
- q+=FormatMagickString(q,extent,"%lu",(unsigned long)
+ q+=FormatMagickString(q,extent,"%.20g",(double)
(image->rows != 0 ? image->rows : image->magick_rows));
break;
}
/*
Number of unique colors.
*/
- q+=FormatMagickString(q,extent,"%lu",(unsigned long)
+ q+=FormatMagickString(q,extent,"%.20g",(double)
GetNumberColors(image,(FILE *) NULL,&image->exception));
break;
}
/*
Number of images in the list.
*/
- q+=FormatMagickString(q,extent,"%lu",(unsigned long)
+ q+=FormatMagickString(q,extent,"%.20g",(double)
GetImageListLength(image));
break;
}
p=image;
for (page=1; GetPreviousImageInList(p) != (Image *) NULL; page++)
p=GetPreviousImageInList(p);
- q+=FormatMagickString(q,extent,"%lu",(unsigned long) page);
+ q+=FormatMagickString(q,extent,"%.20g",(double) page);
break;
}
case 'q':
/*
Image depth.
*/
- q+=FormatMagickString(q,extent,"%lu",(unsigned long) image->depth);
+ q+=FormatMagickString(q,extent,"%.20g",(double) image->depth);
break;
}
case 'r':
Image scene number.
*/
if (text_info->number_scenes == 0)
- q+=FormatMagickString(q,extent,"%lu",(unsigned long) image->scene);
+ q+=FormatMagickString(q,extent,"%.20g",(double) image->scene);
else
- q+=FormatMagickString(q,extent,"%lu",(unsigned long)
- text_info->scene);
+ q+=FormatMagickString(q,extent,"%.20g",(double) text_info->scene);
break;
}
case 'u':
/*
Image width.
*/
- q+=FormatMagickString(q,extent,"%lu",(unsigned long)
+ q+=FormatMagickString(q,extent,"%.20g",(double)
(image->columns != 0 ? image->columns : image->magick_columns));
break;
}
/*
Image depth.
*/
- q+=FormatMagickString(q,extent,"%lu",(unsigned long) image->depth);
+ q+=FormatMagickString(q,extent,"%.20g",(double) image->depth);
break;
}
case 'A':
}
case 'G':
{
- q+=FormatMagickString(q,extent,"%lux%lu",(unsigned long)
- image->magick_columns,(unsigned long) image->magick_rows);
+ q+=FormatMagickString(q,extent,"%.20gx%.20g",(double)
+ image->magick_columns,(double) image->magick_rows);
break;
}
case 'H':
{
- q+=FormatMagickString(q,extent,"%lu",(unsigned long)
+ q+=FormatMagickString(q,extent,"%.20g",(double)
image->page.height);
break;
}
}
case 'P':
{
- q+=FormatMagickString(q,extent,"%lux%lu",(unsigned long)
- image->page.width,(unsigned long) image->page.height);
+ q+=FormatMagickString(q,extent,"%.20gx%.20g",(double) image->page.width,
+ (double) image->page.height);
break;
}
case 'Q':
{
- q+=FormatMagickString(q,extent,"%lu",(unsigned long) image->quality);
+ q+=FormatMagickString(q,extent,"%.20g",(double) image->quality);
break;
}
case 'S':
if (text_info->number_scenes == 0)
q+=CopyMagickString(q,"2147483647",extent);
else
- q+=FormatMagickString(q,extent,"%lu",(unsigned long)
+ q+=FormatMagickString(q,extent,"%.20g",(double)
(text_info->scene+text_info->number_scenes));
break;
}
case 'T':
{
- q+=FormatMagickString(q,extent,"%lu",(unsigned long) image->delay);
+ q+=FormatMagickString(q,extent,"%.20g",(double) image->delay);
break;
}
case 'W':
{
- q+=FormatMagickString(q,extent,"%lu",(unsigned long) image->page.width);
+ q+=FormatMagickString(q,extent,"%.20g",(double) image->page.width);
break;
}
case 'X':
{
- q+=FormatMagickString(q,extent,"%+ld",(long) image->page.x);
+ q+=FormatMagickString(q,extent,"%+.20g",(double) image->page.x);
break;
}
case 'Y':
{
- q+=FormatMagickString(q,extent,"%+ld",(long) image->page.y);
+ q+=FormatMagickString(q,extent,"%+.20g",(double) image->page.y);
break;
}
case 'Z':
Image bounding box.
*/
page=GetImageBoundingBox(image,&image->exception);
- q+=FormatMagickString(q,MaxTextExtent,"%lux%lu%+ld%+ld",(unsigned long)
- page.width,(unsigned long) page.height,(long) page.x,(long) page.y);
+ q+=FormatMagickString(q,MaxTextExtent,"%.20gx%.20g%+.20gx%+.20g",
+ (double) page.width,(double) page.height,(double) page.x,(double)
+ page.y);
break;
}
case '#':
Output filter graph -- for graphing filter result.
*/
support=GetResizeFilterSupport(resize_filter);
- (void) printf("# support = %lg\n",support);
+ (void) printf("# support = %g\n",support);
for (x=0.0; x <= support; x+=0.01f)
(void) printf("%5.2lf\t%lf\n",x,(double) GetResizeFilterWeight(
resize_filter,x));
(void) CopyMagickString(value,image->magick_filename,MaxTextExtent);
if (GetPathAttributes(image->filename,&attributes) != MagickFalse)
{
- (void) FormatMagickString(value,MaxTextExtent,"%ld",(long)
+ (void) FormatMagickString(value,MaxTextExtent,"%.20g",(double)
attributes.st_mtime);
(void) SetImageProperty(thumbnail_image,"Thumb::MTime",value);
}
- (void) FormatMagickString(value,MaxTextExtent,"%ld",(long)
+ (void) FormatMagickString(value,MaxTextExtent,"%.20g",(double)
attributes.st_mtime);
(void) FormatMagickSize(GetBlobSize(image),MagickFalse,value);
(void) ConcatenateMagickString(value,"B",MaxTextExtent);
(void) SetImageProperty(thumbnail_image,"Thumb::Mimetype",value);
(void) SetImageProperty(thumbnail_image,"software",
GetMagickVersion(&version));
- (void) FormatMagickString(value,MaxTextExtent,"%lu",
- (unsigned long) image->magick_columns);
+ (void) FormatMagickString(value,MaxTextExtent,"%.20g",(double)
+ image->magick_columns);
(void) SetImageProperty(thumbnail_image,"Thumb::Image::Width",value);
- (void) FormatMagickString(value,MaxTextExtent,"%lu",(unsigned long)
+ (void) FormatMagickString(value,MaxTextExtent,"%.20g",(double)
image->magick_rows);
(void) SetImageProperty(thumbnail_image,"Thumb::Image::height",value);
- (void) FormatMagickString(value,MaxTextExtent,"%lu",
- (unsigned long) GetImageListLength(image));
+ (void) FormatMagickString(value,MaxTextExtent,"%.20g",(double)
+ GetImageListLength(image));
(void) SetImageProperty(thumbnail_image,"Thumb::Document::Pages",value);
return(thumbnail_image);
}
(void) FormatMagickSize(resource_info.disk_limit,MagickFalse,disk_limit);
(void) CopyMagickString(time_limit,"unlimited",MaxTextExtent);
if (resource_info.time_limit != MagickResourceInfinity)
- (void) FormatMagickString(time_limit,MaxTextExtent,"%lu",(unsigned long)
+ (void) FormatMagickString(time_limit,MaxTextExtent,"%.20g",(double)
resource_info.time_limit);
(void) fprintf(file,"File Area Memory Map"
" Disk Thread Time\n");
(void) fprintf(file,"--------------------------------------------------------"
"-----------------------\n");
- (void) fprintf(file,"%4lu %10sB %10sB %10sB %10sB %6lu %11s\n",
- (unsigned long) resource_info.file_limit,area_limit,memory_limit,map_limit,
- disk_limit,(unsigned long) resource_info.thread_limit,time_limit);
+ (void) fprintf(file,"%4g %10sB %10sB %10sB %10sB %6g %11s\n",(double)
+ resource_info.file_limit,area_limit,memory_limit,map_limit,disk_limit,
+ (double) resource_info.thread_limit,time_limit);
(void) fflush(file);
UnlockSemaphoreInfo(resource_semaphore);
return(MagickTrue);
cluster_threshold);
(void) fprintf(stdout,"\tWeighting Exponent = %g\n",(double)
weighting_exponent);
- (void) fprintf(stdout,"\tTotal Number of Clusters = %lu\n\n",
- (unsigned long) number_clusters);
+ (void) fprintf(stdout,"\tTotal Number of Clusters = %.20g\n\n",(double)
+ number_clusters);
/*
Print the total number of points per cluster.
*/
(void) fprintf(stdout,"\n\nNumber of Vectors Per Cluster\n");
(void) fprintf(stdout,"=============================\n\n");
for (cluster=head; cluster != (Cluster *) NULL; cluster=cluster->next)
- (void) fprintf(stdout,"Cluster #%ld = %ld\n",(long) cluster->id,
- (long) cluster->count);
+ (void) fprintf(stdout,"Cluster #%.20g = %.20g\n",(double) cluster->id,
+ (double) cluster->count);
/*
Print the cluster extents.
*/
(void) fprintf(stdout,"================");
for (cluster=head; cluster != (Cluster *) NULL; cluster=cluster->next)
{
- (void) fprintf(stdout,"\n\nCluster #%ld\n\n",(long) cluster->id);
- (void) fprintf(stdout,"%ld-%ld %ld-%ld %ld-%ld\n",(long)
- cluster->red.left,(long) cluster->red.right,(long)
- cluster->green.left,(long) cluster->green.right,(long)
- cluster->blue.left,(long) cluster->blue.right);
+ (void) fprintf(stdout,"\n\nCluster #%.20g\n\n",(double) cluster->id);
+ (void) fprintf(stdout,"%.20g-%.20g %.20g-%.20g %.20g-%.20g\n",(double)
+ cluster->red.left,(double) cluster->red.right,(double)
+ cluster->green.left,(double) cluster->green.right,(double)
+ cluster->blue.left,(double) cluster->blue.right);
}
/*
Print the cluster center values.
(void) fprintf(stdout,"=====================");
for (cluster=head; cluster != (Cluster *) NULL; cluster=cluster->next)
{
- (void) fprintf(stdout,"\n\nCluster #%ld\n\n",(long) cluster->id);
+ (void) fprintf(stdout,"\n\nCluster #%.20g\n\n",(double) cluster->id);
(void) fprintf(stdout,"%g %g %g\n",(double)
cluster->red.center,(double) cluster->green.center,(double)
cluster->blue.center);
median_image=DestroyImage(median_image);
if (image->debug != MagickFalse)
(void) LogMagickEvent(TransformEvent,GetMagickModule()," Deskew geometry: "
- "%lux%lu%+ld%+ld",(unsigned long) geometry.width,(unsigned long)
- geometry.height,(long) geometry.x,(long) geometry.y);
+ "%.20gx%.20g%+.20gx%+.20g",(double) geometry.width,(double)
+ geometry.height,(double) geometry.x,(double) geometry.y);
crop_image=CropImage(deskew_image,&geometry,exception);
deskew_image=DestroyImage(deskew_image);
return(crop_image);
}
if ( map->levels[i] < 0 || map->levels[i] > map->divisor ) {
(void) ThrowMagickException(exception,GetMagickModule(),OptionError,
- "XmlInvalidContent", "<level> %ld out of range, map \"%s\"",
- (long) map->levels[i],map_id);
+ "XmlInvalidContent", "<level> %.20g out of range, map \"%s\"",
+ (double) map->levels[i],map_id);
thresholds = DestroyXMLTree(thresholds);
map = DestroyThresholdMap(map);
return(map);
#endif
#if 0
-printf("DEBUG levels r=%ld g=%ld b=%ld a=%ld i=%ld\n",
+printf("DEBUG levels r=%u g=%u b=%u a=%u i=%u\n",
levels.red, levels.green, levels.blue, levels.opacity, levels.index);
#endif
glyphs="unknown";
if (type_info[i]->glyphs != (char *) NULL)
glyphs=type_info[i]->glyphs;
- (void) FormatMagickString(weight,MaxTextExtent,"%lu",
- (unsigned long) type_info[i]->weight);
+ (void) FormatMagickString(weight,MaxTextExtent,"%.20g",(double)
+ type_info[i]->weight);
(void) fprintf(file," Font: %s\n",name);
(void) fprintf(file," family: %s\n",family);
(void) fprintf(file," style: %s\n",style);
ssize_t
count;
- (void) FormatMagickString(link_path,MaxTextExtent,"/proc/%ld/exe",
- (long) getpid());
+ (void) FormatMagickString(link_path,MaxTextExtent,"/proc/%.20g/exe",
+ (double) getpid());
count=readlink(link_path,execution_path,PATH_MAX);
if (count == -1)
{
- (void) FormatMagickString(link_path,MaxTextExtent,"/proc/%ld/file",
- (long) getpid());
+ (void) FormatMagickString(link_path,MaxTextExtent,"/proc/%.20g/file",
+ (double) getpid());
count=readlink(link_path,execution_path,PATH_MAX);
}
if ((count > 0) && (count <= (ssize_t) PATH_MAX))
undo_image=GetPreviousImageInList(undo_image);
}
(void) fprintf(file,"Undo Edit Cache\n levels: %u\n",levels);
- (void) fprintf(file," bytes: %lumb\n",(unsigned long)
- ((bytes+(1 << 19)) >> 20));
- (void) fprintf(file," limit: %lumb\n\n",(unsigned long)
+ (void) fprintf(file," bytes: %.20gmb\n",(double) ((bytes+(1 << 19)) >> 20));
+ (void) fprintf(file," limit: %.20gmb\n\n",(double)
resource_info->undo_cache);
/*
Write info about the image to a file.
resource_info->image_info->texture != (char *) NULL ?
resource_info->image_info->texture : "pattern:checkerboard",
MaxTextExtent);
- (void) FormatMagickString(size,MaxTextExtent,"%lux%lu",(unsigned long)
- image->columns,(unsigned long) image->rows);
+ (void) FormatMagickString(size,MaxTextExtent,"%.20gx%.20g",(double)
+ image->columns,(double) image->rows);
image_info->size=ConstantString(size);
pattern=ReadImage(image_info,&image->exception);
image_info=DestroyImageInfo(image_info);
resource_info->image_info->texture != (char *) NULL ?
resource_info->image_info->texture : "pattern:checkerboard",
MaxTextExtent);
- (void) FormatMagickString(size,MaxTextExtent,"%lux%lu",(unsigned long)
- image->columns,(unsigned long) image->rows);
+ (void) FormatMagickString(size,MaxTextExtent,"%.20gx%.20g",(double)
+ image->columns,(double) image->rows);
image_info->size=ConstantString(size);
pattern=ReadImage(image_info,&image->exception);
image_info=DestroyImageInfo(image_info);
while ((1 << i) <= (int) magnify)
i++;
(void) FormatMagickString(windows->magnify.name,MaxTextExtent,
- "Magnify %luX",(unsigned long) i);
+ "Magnify %.20gX",(double) i);
status=XStringListToTextProperty(&windows->magnify.name,1,&window_name);
if (status != False)
{
value=resource_info->gamma_correct ? "True" : "False";
XrmPutStringResource(&preferences_database,specifier,(char *) value);
(void) FormatMagickString(specifier,MaxTextExtent,"%s.undoCache",client_name);
- (void) FormatMagickString(cache,MaxTextExtent,"%lu",(unsigned long)
+ (void) FormatMagickString(cache,MaxTextExtent,"%.20g",(double)
resource_info->undo_cache);
XrmPutStringResource(&preferences_database,specifier,cache);
(void) FormatMagickString(specifier,MaxTextExtent,"%s.usePixmap",client_name);
(double) distortion);
if ((reconstruct_image->columns != image->columns) ||
(reconstruct_image->rows != image->rows))
- (void) fprintf(stderr," @ %ld,%ld",(long)
- difference_image->page.x,(long) difference_image->page.y);
+ (void) fprintf(stderr," @ %.20g,%.20g",(double)
+ difference_image->page.x,(double) difference_image->page.y);
(void) fprintf(stderr,"\n");
break;
}
(void) fprintf(stderr,"%g",distortion);
if ((reconstruct_image->columns != image->columns) ||
(reconstruct_image->rows != image->rows))
- (void) fprintf(stderr," @ %ld,%ld",(long)
- difference_image->page.x,(long) difference_image->page.y);
+ (void) fprintf(stderr," @ %.20g,%.20g",(double)
+ difference_image->page.x,(double) difference_image->page.y);
(void) fprintf(stderr,"\n");
break;
}
image->error.normalized_maximum_error);
if ((reconstruct_image->columns != image->columns) ||
(reconstruct_image->rows != image->rows))
- (void) fprintf(stderr," @ %ld,%ld",(long)
- difference_image->page.x,(long) difference_image->page.y);
+ (void) fprintf(stderr," @ %.20g,%.20g",(double)
+ difference_image->page.x,(double) difference_image->page.y);
(void) fprintf(stderr,"\n");
break;
}
(void) fprintf(stderr,"Image: %s\n",image->filename);
if ((reconstruct_image->columns != image->columns) ||
(reconstruct_image->rows != image->rows))
- (void) fprintf(stderr,"Offset: %ld,%ld\n",(long)
- difference_image->page.x,(long) difference_image->page.y);
+ (void) fprintf(stderr,"Offset: %.20g,%.20g\n",(double)
+ difference_image->page.x,(double) difference_image->page.y);
(void) fprintf(stderr," Channel distortion: %s\n",
MagickOptionToMnemonic(MagickMetricOptions,(ssize_t) metric));
switch (metric)
images->filename);
(void) ResetMagickMemory(clone_wand,0,sizeof(*clone_wand));
clone_wand->id=AcquireWandId();
- (void) FormatMagickString(clone_wand->name,MaxTextExtent,"%s-%lu",
- MagickWandId,(unsigned long) clone_wand->id);
+ (void) FormatMagickString(clone_wand->name,MaxTextExtent,"%s-%.20g",
+ MagickWandId,(double) clone_wand->id);
clone_wand->exception=AcquireExceptionInfo();
InheritException(clone_wand->exception,wand->exception);
clone_wand->image_info=CloneImageInfo(wand->image_info);
"MemoryAllocationFailed",GetExceptionMessage(errno));
(void) ResetMagickMemory(clone_wand,0,sizeof(*clone_wand));
clone_wand->id=AcquireWandId();
- (void) FormatMagickString(clone_wand->name,MaxTextExtent,"DrawingWand-%lu",
- (unsigned long) clone_wand->id);
+ (void) FormatMagickString(clone_wand->name,MaxTextExtent,"DrawingWand-%.20g",
+ (double) clone_wand->id);
clone_wand->exception=AcquireExceptionInfo();
InheritException(clone_wand->exception,wand->exception);
clone_wand->mvg=AcquireString(wand->mvg);
char
buffer[MaxTextExtent];
- (void) FormatMagickString(buffer,MaxTextExtent,"%ld bytes",
+ (void) FormatMagickString(buffer,MaxTextExtent,"%.20g bytes",(double)
(4L*blob_length/3L+4L));
ThrowDrawException(ResourceLimitWarning,"MemoryAllocationFailed",
wand->name);
child=AddChildToXMLTree(xml_info,"font-weight",0);
if (child != (XMLTreeInfo *) NULL)
{
- (void) FormatMagickString(value,MaxTextExtent,"%lu",(unsigned long)
+ (void) FormatMagickString(value,MaxTextExtent,"%.20g",(double)
CurrentContext->weight);
(void) SetXMLTreeContent(child,value);
}
child=AddChildToXMLTree(xml_info,"stroke-miterlimit",0);
if (child != (XMLTreeInfo *) NULL)
{
- (void) FormatMagickString(value,MaxTextExtent,"%lu",(unsigned long)
+ (void) FormatMagickString(value,MaxTextExtent,"%.20g",(double)
CurrentContext->miterlimit);
(void) SetXMLTreeContent(child,value);
}
}
(void) FormatMagickString(key,MaxTextExtent,"%s",wand->pattern_id);
(void) SetImageArtifact(wand->image,key,wand->mvg+wand->pattern_offset);
- (void) FormatMagickString(geometry,MaxTextExtent,"%lux%lu%+ld%+ld",
- (unsigned long) wand->pattern_bounds.width,(unsigned long)
- wand->pattern_bounds.height,(long) wand->pattern_bounds.x,
- (long) wand->pattern_bounds.y);
+ (void) FormatMagickString(geometry,MaxTextExtent,"%.20gx%.20g%+.20gx%+.20g",
+ (double) wand->pattern_bounds.width,(double) wand->pattern_bounds.height,
+ (double) wand->pattern_bounds.x,(double) wand->pattern_bounds.y);
(void) SetImageArtifact(wand->image,key,geometry);
wand->pattern_id=DestroyString(wand->pattern_id);
wand->pattern_offset=0;
(CurrentContext->weight != font_weight))
{
CurrentContext->weight=font_weight;
- (void) MvgPrintf(wand,"font-weight %lu\n",(unsigned long) font_weight);
+ (void) MvgPrintf(wand,"font-weight %.20g\n",(double) font_weight);
}
}
\f
if (CurrentContext->miterlimit != miterlimit)
{
CurrentContext->miterlimit=miterlimit;
- (void) MvgPrintf(wand,"stroke-miterlimit %lu\n",(unsigned long)
- miterlimit);
+ (void) MvgPrintf(wand,"stroke-miterlimit %.20g\n",(double) miterlimit);
}
}
\f
assert(wand->signature == WandSignature);
if (wand->debug != MagickFalse)
(void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
- (void) MvgPrintf(wand,"viewbox %ld %ld %ld %ld\n",(long) x1,(long) y1,
- (long) x2,(long) y2);
+ (void) MvgPrintf(wand,"viewbox %.20g %.20g %.20g %.20g\n",(double) x1,
+ (double) y1,(double) x2,(double) y2);
}
\f
/*
GetExceptionMessage(errno));
(void) ResetMagickMemory(wand,0,sizeof(*wand));
wand->id=AcquireWandId();
- (void) FormatMagickString(wand->name,MaxTextExtent,"%s-%lu",DrawingWandId,
- (unsigned long) wand->id);
+ (void) FormatMagickString(wand->name,MaxTextExtent,"%s-%.20g",DrawingWandId,
+ (double) wand->id);
if (wand->debug != MagickFalse)
(void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
wand->mvg=(char *) NULL;
images->filename);
(void) ResetMagickMemory(clone_wand,0,sizeof(*clone_wand));
clone_wand->id=AcquireWandId();
- (void) FormatMagickString(clone_wand->name,MaxTextExtent,"%s-%lu",
- MagickWandId,(unsigned long) clone_wand->id);
+ (void) FormatMagickString(clone_wand->name,MaxTextExtent,"%s-%.20g",
+ MagickWandId,(double) clone_wand->id);
clone_wand->exception=AcquireExceptionInfo();
InheritException(clone_wand->exception,wand->exception);
clone_wand->image_info=CloneImageInfo(wand->image_info);
assert(wand->signature == WandSignature);
if (wand->debug != MagickFalse)
(void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
- (void) FormatMagickString(geometry,MaxTextExtent,"%lux%lu%+ld%+ld",
- (unsigned long) width,(unsigned long) height,(long) x,(long) y);
+ (void) FormatMagickString(geometry,MaxTextExtent,"%.20gx%.20g%+.20gx%+.20g",
+ (double) width,(double) height,(double) x,(double) y);
(void) CloneString(&wand->image_info->page,geometry);
return(MagickTrue);
}
assert(wand->signature == WandSignature);
if (wand->debug != MagickFalse)
(void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
- (void) FormatMagickString(geometry,MaxTextExtent,"%lux%lu",(unsigned long)
- columns,(unsigned long) rows);
+ (void) FormatMagickString(geometry,MaxTextExtent,"%.20gx%.20g",(double)
+ columns,(double) rows);
(void) CloneString(&wand->image_info->size,geometry);
return(MagickTrue);
}
assert(wand->signature == WandSignature);
if (wand->debug != MagickFalse)
(void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
- (void) FormatMagickString(geometry,MaxTextExtent,"%lux%lu%+ld",
- (unsigned long) columns,(unsigned long) rows,(long) offset);
+ (void) FormatMagickString(geometry,MaxTextExtent,"%.20gx%.20g%+.20g",
+ (double) columns,(double) rows,(double) offset);
(void) CloneString(&wand->image_info->size,geometry);
return(MagickTrue);
}
wand->name);
(void) ResetMagickMemory(clone_wand,0,sizeof(*clone_wand));
clone_wand->id=AcquireWandId();
- (void) FormatMagickString(clone_wand->name,MaxTextExtent,"%s-%lu",
- MagickWandId,(unsigned long) clone_wand->id);
+ (void) FormatMagickString(clone_wand->name,MaxTextExtent,"%s-%.20g",
+ MagickWandId,(double) clone_wand->id);
clone_wand->exception=AcquireExceptionInfo();
InheritException(clone_wand->exception,wand->exception);
clone_wand->image_info=CloneImageInfo(wand->image_info);
GetExceptionMessage(errno));
(void) ResetMagickMemory(wand,0,sizeof(*wand));
wand->id=AcquireWandId();
- (void) FormatMagickString(wand->name,MaxTextExtent,"%s-%lu",MagickWandId,
- (unsigned long) wand->id);
+ (void) FormatMagickString(wand->name,MaxTextExtent,"%s-%.20g",MagickWandId,
+ (double) wand->id);
wand->exception=AcquireExceptionInfo();
wand->image_info=AcquireImageInfo();
wand->quantize_info=CloneQuantizeInfo((QuantizeInfo *) NULL);
elapsed_time=GetElapsedTime(timer);
user_time=GetUserTime(timer);
(void) fprintf(stderr,
- "Performance: %lui %gips %0.3fu %ld:%02ld.%03ld\n",(unsigned long)
- iterations,1.0*iterations/elapsed_time,user_time,(long)
- (elapsed_time/60.0),(long) floor(fmod(elapsed_time,60.0)),
- (long) (1000.0*(elapsed_time-floor(elapsed_time))));
+ "Performance: %.20gi %gips %0.3fu %.20g:%02g.%03g\n",(double)
+ iterations,1.0*iterations/elapsed_time,user_time,(double)
+ (elapsed_time/60.0),floor(fmod(elapsed_time,60.0)),(double)
+ (1000.0*(elapsed_time-floor(elapsed_time))));
}
timer=DestroyTimerInfo(timer);
return(status);
(void) InterpretImageFilename(image_info,(Image *) NULL,
image_info->filename,(int) scene,filename);
if (LocaleCompare(filename,image_info->filename) == 0)
- (void) FormatMagickString(filename,MaxTextExtent,"%s.%lu",
- image_info->filename,(unsigned long) scene);
+ (void) FormatMagickString(filename,MaxTextExtent,"%s.%.20g",
+ image_info->filename,(double) scene);
(void) CopyMagickString(image_info->filename,filename,
MaxTextExtent);
}
iterator->name);
(void) ResetMagickMemory(clone_iterator,0,sizeof(*clone_iterator));
clone_iterator->id=AcquireWandId();
- (void) FormatMagickString(clone_iterator->name,MaxTextExtent,"%s-%lu",
- PixelIteratorId,(unsigned long) clone_iterator->id);
+ (void) FormatMagickString(clone_iterator->name,MaxTextExtent,"%s-%.20g",
+ PixelIteratorId,(double) clone_iterator->id);
clone_iterator->exception=AcquireExceptionInfo();
InheritException(clone_iterator->exception,iterator->exception);
clone_iterator->view=CloneCacheView(iterator->view);
GetExceptionMessage(errno));
(void) ResetMagickMemory(iterator,0,sizeof(*iterator));
iterator->id=AcquireWandId();
- (void) FormatMagickString(iterator->name,MaxTextExtent,"%s-%lu",
- PixelIteratorId,(unsigned long) iterator->id);
+ (void) FormatMagickString(iterator->name,MaxTextExtent,"%s-%.20g",
+ PixelIteratorId,(double) iterator->id);
iterator->exception=AcquireExceptionInfo();
iterator->view=view;
SetGeometry(image,&iterator->region);
wand->name);
(void) ResetMagickMemory(iterator,0,sizeof(*iterator));
iterator->id=AcquireWandId();
- (void) FormatMagickString(iterator->name,MaxTextExtent,"%s-%lu",
- PixelIteratorId,(unsigned long) iterator->id);
+ (void) FormatMagickString(iterator->name,MaxTextExtent,"%s-%.20g",
+ PixelIteratorId,(double) iterator->id);
iterator->exception=AcquireExceptionInfo();
iterator->view=view;
SetGeometry(image,&iterator->region);
pixel_view->name);
(void) ResetMagickMemory(clone_view,0,sizeof(*clone_view));
clone_view->id=AcquireWandId();
- (void) FormatMagickString(clone_view->name,MaxTextExtent,"%s-%lu",PixelViewId,
- (unsigned long) clone_view->id);
+ (void) FormatMagickString(clone_view->name,MaxTextExtent,"%s-%.20g",
+ PixelViewId,(double) clone_view->id);
clone_view->exception=AcquireExceptionInfo();
InheritException(clone_view->exception,pixel_view->exception);
clone_view->view=CloneCacheView(pixel_view->view);
GetExceptionMessage(errno));
(void) ResetMagickMemory(pixel_view,0,sizeof(*pixel_view));
pixel_view->id=AcquireWandId();
- (void) FormatMagickString(pixel_view->name,MaxTextExtent,"%s-%lu",
- PixelViewId,(unsigned long) pixel_view->id);
+ (void) FormatMagickString(pixel_view->name,MaxTextExtent,"%s-%.20g",
+ PixelViewId,(double) pixel_view->id);
pixel_view->exception=AcquireExceptionInfo();
pixel_view->wand=wand;
pixel_view->view=AcquireCacheView(pixel_view->wand->images);
GetExceptionMessage(errno));
(void) ResetMagickMemory(pixel_view,0,sizeof(*pixel_view));
pixel_view->id=AcquireWandId();
- (void) FormatMagickString(pixel_view->name,MaxTextExtent,"%s-%lu",
- PixelViewId,(unsigned long) pixel_view->id);
+ (void) FormatMagickString(pixel_view->name,MaxTextExtent,"%s-%.20g",
+ PixelViewId,(double) pixel_view->id);
pixel_view->exception=AcquireExceptionInfo();
pixel_view->view=AcquireCacheView(pixel_view->wand->images);
pixel_view->wand=wand;
wand->name);
(void) ResetMagickMemory(clone_wand,0,sizeof(*clone_wand));
clone_wand->id=AcquireWandId();
- (void) FormatMagickString(clone_wand->name,MaxTextExtent,"%s-%lu",PixelWandId,
- (unsigned long) clone_wand->id);
+ (void) FormatMagickString(clone_wand->name,MaxTextExtent,"%s-%.20g",
+ PixelWandId,(double) clone_wand->id);
clone_wand->exception=AcquireExceptionInfo();
InheritException(clone_wand->exception,wand->exception);
clone_wand->pixel=wand->pixel;
GetExceptionMessage(errno));
(void) ResetMagickMemory(wand,0,sizeof(*wand));
wand->id=AcquireWandId();
- (void) FormatMagickString(wand->name,MaxTextExtent,"%s-%lu",PixelWandId,
- (unsigned long) wand->id);
+ (void) FormatMagickString(wand->name,MaxTextExtent,"%s-%.20g",PixelWandId,
+ (double) wand->id);
wand->exception=AcquireExceptionInfo();
GetMagickPixelPacket((Image *) NULL,&wand->pixel);
wand->debug=IsEventLogging();
if (status == MagickFalse)
ThrowAPIException(magick_wand);
if (MagickGetNumberImages(magick_wand) != 5)
- (void) fprintf(stderr,"read %lu images; expected 5\n",
- (unsigned long) MagickGetNumberImages(magick_wand));
+ (void) fprintf(stderr,"read %.20g images; expected 5\n",
+ (double) MagickGetNumberImages(magick_wand));
(void) fprintf(stdout,"Iterate forward...\n");
MagickResetIterator(magick_wand);
while (MagickNextImage(magick_wand) != MagickFalse)
- (void) fprintf(stdout,"index %ld scene %lu\n",(long)
- MagickGetIteratorIndex(magick_wand),(unsigned long)
+ (void) fprintf(stdout,"index %.20g scene %.20g\n",(double)
+ MagickGetIteratorIndex(magick_wand),(double)
MagickGetImageScene(magick_wand));
(void) fprintf(stdout,"Iterate reverse...\n");
while (MagickPreviousImage(magick_wand) != MagickFalse)
- (void) fprintf(stdout,"index %ld scene %lu\n",(long)
- MagickGetIteratorIndex(magick_wand),(unsigned long)
+ (void) fprintf(stdout,"index %.20g scene %.20g\n",(double)
+ MagickGetIteratorIndex(magick_wand),(double)
MagickGetImageScene(magick_wand));
(void) fprintf(stdout,"Remove scene 1...\n");
(void) MagickSetIteratorIndex(magick_wand,1);
ThrowAPIException(magick_wand);
MagickResetIterator(magick_wand);
while (MagickNextImage(magick_wand) != MagickFalse)
- (void) fprintf(stdout,"index %ld scene %lu\n",(long)
- MagickGetIteratorIndex(magick_wand),(unsigned long)
+ (void) fprintf(stdout,"index %.20g scene %.20g\n",(double)
+ MagickGetIteratorIndex(magick_wand),(double)
MagickGetImageScene(magick_wand));
(void) fprintf(stdout,"Insert scene 1 back in sequence...\n");
(void) MagickSetIteratorIndex(magick_wand,0);
ThrowAPIException(magick_wand);
MagickResetIterator(magick_wand);
while (MagickNextImage(magick_wand) != MagickFalse)
- (void) fprintf(stdout,"index %ld scene %lu\n",(long)
- MagickGetIteratorIndex(magick_wand),(unsigned long)
+ (void) fprintf(stdout,"index %.20g scene %.20g\n",(double)
+ MagickGetIteratorIndex(magick_wand),(double)
MagickGetImageScene(magick_wand));
(void) fprintf(stdout,"Set scene 2 to scene 1...\n");
(void) MagickSetIteratorIndex(magick_wand,2);
ThrowAPIException(magick_wand);
MagickResetIterator(magick_wand);
while (MagickNextImage(magick_wand) != MagickFalse)
- (void) fprintf(stdout,"index %ld scene %lu\n",(long)
- MagickGetIteratorIndex(magick_wand),(unsigned long)
+ (void) fprintf(stdout,"index %.20g scene %.20g\n",(double)
+ MagickGetIteratorIndex(magick_wand),(double)
MagickGetImageScene(magick_wand));
(void) fprintf(stdout,"Apply image processing options...\n");
status=MagickCropImage(magick_wand,60,60,10,10);