mirror of
https://github.com/ImageMagick/ImageMagick.git
synced 2026-05-31 11:18:42 +02:00
Introduced MagickTimeExtent.
This commit is contained in:
@@ -661,7 +661,7 @@ MagickExport Image *ReadImage(const ImageInfo *image_info,
|
||||
char
|
||||
magick_path[MagickPathExtent],
|
||||
*property,
|
||||
timestamp[MagickPathExtent];
|
||||
timestamp[MagickTimeExtent];
|
||||
|
||||
const char
|
||||
*option;
|
||||
@@ -815,10 +815,10 @@ MagickExport Image *ReadImage(const ImageInfo *image_info,
|
||||
if (source_date_epoch == (const char *) NULL)
|
||||
{
|
||||
(void) FormatMagickTime((time_t) GetBlobProperties(next)->st_mtime,
|
||||
MagickPathExtent,timestamp);
|
||||
sizeof(timestamp),timestamp);
|
||||
(void) SetImageProperty(next,"date:modify",timestamp,exception);
|
||||
(void) FormatMagickTime((time_t) GetBlobProperties(next)->st_ctime,
|
||||
MagickPathExtent,timestamp);
|
||||
sizeof(timestamp),timestamp);
|
||||
(void) SetImageProperty(next,"date:create",timestamp,exception);
|
||||
}
|
||||
option=GetImageOption(image_info,"delay");
|
||||
|
||||
+2
-2
@@ -1231,12 +1231,12 @@ static char *TranslateEvent(const char *module,const char *function,
|
||||
if (LocaleCompare(log_info->format,"xml") == 0)
|
||||
{
|
||||
char
|
||||
timestamp[MagickPathExtent];
|
||||
timestamp[MagickTimeExtent];
|
||||
|
||||
/*
|
||||
Translate event in "XML" format.
|
||||
*/
|
||||
(void) FormatMagickTime(seconds,extent,timestamp);
|
||||
(void) FormatMagickTime(seconds,sizeof(timestamp),timestamp);
|
||||
(void) FormatLocaleString(text,extent,
|
||||
"<entry>\n"
|
||||
" <timestamp>%s</timestamp>\n"
|
||||
|
||||
@@ -88,6 +88,7 @@ extern "C" {
|
||||
# define MagickPathExtent 4096 /* always >= 4096 */
|
||||
#endif
|
||||
#define MaxTextExtent MagickPathExtent
|
||||
#define MagickTimeExtent 26
|
||||
|
||||
#if defined(MAGICKCORE_HAVE___ATTRIBUTE__)
|
||||
# define magick_aligned(x,y) x __attribute__((aligned(y)))
|
||||
|
||||
+2
-2
@@ -163,12 +163,12 @@ static void SetDNGProperties(Image *image,const libraw_data_t *raw_info,
|
||||
ExceptionInfo *exception)
|
||||
{
|
||||
char
|
||||
timestamp[MagickPathExtent];
|
||||
timestamp[MagickTimeExtent];
|
||||
|
||||
(void) SetImageProperty(image,"dng:make",raw_info->idata.make,exception);
|
||||
(void) SetImageProperty(image,"dng:camera.model.name",raw_info->idata.model,
|
||||
exception);
|
||||
(void) FormatMagickTime(raw_info->other.timestamp,MagickPathExtent,timestamp);
|
||||
(void) FormatMagickTime(raw_info->other.timestamp,sizeof(timestamp),timestamp);
|
||||
(void) SetImageProperty(image,"dng:create.date",timestamp,exception);
|
||||
(void) FormatImageProperty(image,"dng:iso.setting","%0.1f",
|
||||
raw_info->other.iso_speed);
|
||||
|
||||
+6
-6
@@ -1402,9 +1402,9 @@ static MagickBooleanType WritePDFImage(const ImageInfo *image_info,Image *image,
|
||||
if (LocaleCompare(image_info->magick,"PDFA") == 0)
|
||||
{
|
||||
char
|
||||
create_date[MagickPathExtent],
|
||||
modify_date[MagickPathExtent],
|
||||
timestamp[MagickPathExtent],
|
||||
create_date[MagickTimeExtent],
|
||||
modify_date[MagickTimeExtent],
|
||||
timestamp[MagickTimeExtent],
|
||||
xmp_profile[MagickPathExtent];
|
||||
|
||||
/*
|
||||
@@ -1419,12 +1419,12 @@ static MagickBooleanType WritePDFImage(const ImageInfo *image_info,Image *image,
|
||||
*modify_date='\0';
|
||||
value=GetImageProperty(image,"date:modify",exception);
|
||||
if (value != (const char *) NULL)
|
||||
(void) CopyMagickString(modify_date,value,MagickPathExtent);
|
||||
(void) CopyMagickString(modify_date,value,sizeof(modify_date));
|
||||
*create_date='\0';
|
||||
value=GetImageProperty(image,"date:create",exception);
|
||||
if (value != (const char *) NULL)
|
||||
(void) CopyMagickString(create_date,value,MagickPathExtent);
|
||||
(void) FormatMagickTime(GetMagickTime(),MagickPathExtent,timestamp);
|
||||
(void) CopyMagickString(create_date,value,sizeof(create_date));
|
||||
(void) FormatMagickTime(GetMagickTime(),sizeof(timestamp),timestamp);
|
||||
url=(char *) MagickAuthoritativeURL;
|
||||
escape=EscapeParenthesis(basename);
|
||||
i=FormatLocaleString(xmp_profile,MagickPathExtent,XMPProfile,
|
||||
|
||||
+2
-2
@@ -1337,7 +1337,7 @@ static MagickBooleanType WritePSImage(const ImageInfo *image_info,Image *image,
|
||||
|
||||
char
|
||||
buffer[MagickPathExtent],
|
||||
date[MagickPathExtent],
|
||||
date[MagickTimeExtent],
|
||||
**labels,
|
||||
page_geometry[MagickPathExtent];
|
||||
|
||||
@@ -1516,7 +1516,7 @@ static MagickBooleanType WritePSImage(const ImageInfo *image_info,Image *image,
|
||||
image->filename);
|
||||
(void) WriteBlobString(image,buffer);
|
||||
timer=GetMagickTime();
|
||||
(void) FormatMagickTime(timer,MagickPathExtent,date);
|
||||
(void) FormatMagickTime(timer,sizeof(date),date);
|
||||
(void) FormatLocaleString(buffer,MagickPathExtent,
|
||||
"%%%%CreationDate: (%s)\n",date);
|
||||
(void) WriteBlobString(image,buffer);
|
||||
|
||||
+2
-2
@@ -375,7 +375,7 @@ static MagickBooleanType WritePS2Image(const ImageInfo *image_info,Image *image,
|
||||
|
||||
char
|
||||
buffer[MagickPathExtent],
|
||||
date[MagickPathExtent],
|
||||
date[MagickTimeExtent],
|
||||
page_geometry[MagickPathExtent],
|
||||
**labels;
|
||||
|
||||
@@ -566,7 +566,7 @@ static MagickBooleanType WritePS2Image(const ImageInfo *image_info,Image *image,
|
||||
image->filename);
|
||||
(void) WriteBlobString(image,buffer);
|
||||
timer=GetMagickTime();
|
||||
(void) FormatMagickTime(timer,MagickPathExtent,date);
|
||||
(void) FormatMagickTime(timer,sizeof(date),date);
|
||||
(void) FormatLocaleString(buffer,MagickPathExtent,
|
||||
"%%%%CreationDate: (%s)\n",date);
|
||||
(void) WriteBlobString(image,buffer);
|
||||
|
||||
+2
-2
@@ -813,7 +813,7 @@ static MagickBooleanType WritePS3Image(const ImageInfo *image_info,Image *image,
|
||||
|
||||
char
|
||||
buffer[MagickPathExtent],
|
||||
date[MagickPathExtent],
|
||||
date[MagickTimeExtent],
|
||||
**labels,
|
||||
page_geometry[MagickPathExtent];
|
||||
|
||||
@@ -1016,7 +1016,7 @@ static MagickBooleanType WritePS3Image(const ImageInfo *image_info,Image *image,
|
||||
image->filename);
|
||||
(void) WriteBlobString(image,buffer);
|
||||
timer=GetMagickTime();
|
||||
(void) FormatMagickTime(timer,MagickPathExtent,date);
|
||||
(void) FormatMagickTime(timer,sizeof(date),date);
|
||||
(void) FormatLocaleString(buffer,MagickPathExtent,
|
||||
"%%%%CreationDate: %s\n",date);
|
||||
(void) WriteBlobString(image,buffer);
|
||||
|
||||
Reference in New Issue
Block a user