changeset 26:a6e11adda0be

The format of JPEG EXIF data converted to BPG had an extraneous zero byte at front .. this is probably not intentional. Fixed. Programs reading BPG files may wish to compensate by checking for 0 before the "II" "TIFF" EXIF header.
author Matti Hamalainen <ccr@tnsp.org>
date Wed, 10 May 2017 14:26:20 +0300
parents a6e6f87414ea
children 4aa0611ad85a
files bpgenc.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/bpgenc.c	Wed May 10 14:10:45 2017 +0300
+++ b/bpgenc.c	Wed May 10 14:26:20 2017 +0300
@@ -1534,7 +1534,7 @@
 
 static BPGMetaData *jpeg_get_metadata(jpeg_saved_marker_ptr first_marker)
 {
-    static const char app1_exif[] = "Exif";
+    static const char app1_exif[6] = "Exif\x00\x00";
     static const char app1_xmp[] = "http://ns.adobe.com/xap/1.0/";
     static const char app2_iccp[] = "ICC_PROFILE";
     jpeg_saved_marker_ptr marker;