GraphicsMagick: 2 new changesets
GraphicsMagick Commits <[email protected]> Thu, 11 Jan 2024 18:58:29 -0600
| Newsgroups | gmane.comp.video.graphicsmagick.cvs |
|---|---|
| Message-ID | <mailman.2134.1705021124.19238.graphicsmagick-commit@lists.sourceforge.net> |
changeset d8f9e5092c30 in /hg/GraphicsMagick
details: http://hg.GraphicsMagick.org/hg/GraphicsMagick?cmd=changeset;node=d8f9e5092c30
summary: coders/tiff.c EXIFTAG_LENSSPECIFICATION needs 4 float values, will be implemented later.
changeset 4f276520c791 in /hg/GraphicsMagick
details: http://hg.GraphicsMagick.org/hg/GraphicsMagick?cmd=changeset;node=4f276520c791
summary: coders/tiff.c Bad define EXPERIMENTAL_EXIF_TAGS, now fixed.
diffstat:
coders/tiff.c | 19 +++++++++++++++----
1 files changed, 15 insertions(+), 4 deletions(-)
diffs (50 lines):
diff -r ebb49cf121a3 -r 4f276520c791 coders/tiff.c
--- a/coders/tiff.c Fri Jan 12 00:56:16 2024 +0100
+++ b/coders/tiff.c Fri Jan 12 01:58:08 2024 +0100
@@ -73,7 +73,7 @@
# endif /* if defined(COMPRESSION_ZSTD) && defined(HasZSTD) */
#if !defined(EXPERIMENTAL_EXIF_TAGS)
-# define EXPERIMENTAL_EXIF_TAGS 1 //0
+# define EXPERIMENTAL_EXIF_TAGS 0
#endif /* if !defined(EXPERIMENTAL_EXIF_TAGS) */
/*
@@ -4554,15 +4554,26 @@
/* case TIFF_SRATIONAL:
break; */
case TIFF_RATIONAL:
- if(FDT==TIFF_RATIONAL && Value!=0)
+ if(Tag==EXIFTAG_LENSSPECIFICATION) break; // Needs 4 float values, will be implemented later
+
+ if(FDT==TIFF_RATIONAL)
{
double d;
if(Value+8>=profile_length) break;
d = LD_UINT32(profile_data+Value+4);
if(d==0) break; /* Prevent division by 0. */
d = LD_UINT32(profile_data+Value) / d;
- if(TIFFSetField(tiff, Tag, d))
+ if(Tag==TIFFTAG_XRESOLUTION || Tag==TIFFTAG_YRESOLUTION)
+ {
+ const float f = d;
+ if(TIFFSetField(tiff, Tag, f))
FieldCount++;
+ }
+ else
+ {
+ if(TIFFSetField(tiff, Tag, d))
+ FieldCount++;
+ }
}
break;
}
@@ -6019,7 +6030,7 @@
(void) TIFFSetField(tiff,TIFFTAG_YRESOLUTION,image->y_resolution);
}
-#if defined(EXPERIMENTAL_EXIF_TAGS)
+#if EXPERIMENTAL_EXIF_TAGS
#if TIFFLIB_VERSION >= 20120922
if(status!=MagickFail)
{