-
Notifications
You must be signed in to change notification settings - Fork 298
Description
Describe the bug
I generated an image with Imagen/Gemini 2.5 Flash at gemini.google.com, downloaded it, and when I opened the PNG in GIMP, got a GIMP Debug window saying "GIMP encountered an error: GIMP-WARNING: Failed to decode Exif metadata." exiv2 print
displays the same warning along with "No Exif data found in the file" so I'm reporting it here as well as GIMP issue 14653.
To Reproduce
Steps to reproduce the behavior:
- Here's the file, compressed in case GitHub changes the metadata of an uploaded image:
Gemini_image_exif_warning.zip. I took the original photo that Google Gemini Image generation modified, and nobody can copyright AI images, so do with it whatever you want. - To reproduce, go to gemini.google.com, click Image, generate an image. Download it. Run
exiv2 print FILENAME
(the zip file contains Gemini_Generated_Image_20wm9820wm9820wm.png). - This is in exiv2 version 0.28.5 as packaged for Fedora 41 (and in whatever exiv2 library is packaged by the GIMP 3.1.2 Flatpak app).
Expected behavior
No warning, unless of course Google Gemini generates garbled .png files. (with other stripped images exiv2 prints "No Exif data found in the file" without a warning.) ImageMagick doesn't print a warning
Desktop (please complete the following information):
- Linux Fedora 41
- Exiv2 version and source: version 0.28.5 as packaged for Fedora 41, using exiv2-libs version 0.28.5
- Compiler and version: ??
- Compilation mode and/or compiler flags: ?? The binary reports
% ldd /usr/bin/exiv2
linux-vdso.so.1 (0x00007f508a98a000)
libexiv2.so.28 => /usr/bin/../lib64/libexiv2.so.28 (0x00007f508a600000)
libstdc++.so.6 => /usr/bin/../lib64/libstdc++.so.6 (0x00007f508a200000)
libgcc_s.so.1 => /usr/bin/../lib64/libgcc_s.so.1 (0x00007f508a902000)
libc.so.6 => /usr/bin/../lib64/libc.so.6 (0x00007f508a00c000)
libexpat.so.1 => /usr/bin/../lib64/../lib64/libexpat.so.1 (0x00007f508a8d8000)
libz.so.1 => /usr/bin/../lib64/../lib64/libz.so.1 (0x00007f508a5dc000)
libbrotlidec.so.1 => /usr/bin/../lib64/../lib64/libbrotlidec.so.1 (0x00007f508a5ce000)
libINIReader.so.0 => /usr/bin/../lib64/../lib64/libINIReader.so.0 (0x00007f508a8ce000)
libm.so.6 => /usr/bin/../lib64/../lib64/libm.so.6 (0x00007f508a4e8000)
/lib64/ld-linux-x86-64.so.2 (0x00007f508a98c000)
libbrotlicommon.so.1 => /lib64/libbrotlicommon.so.1 (0x00007f508a4af000)
libinih.so.0 => /lib64/libinih.so.0 (0x00007f508a4aa000)
Additional context
Here's the full exiv2 output:
% exiv2 -v print Gemini_Generated_Image_20wm9820wm9820wm.png
File 1/1: Gemini_Generated_Image_20wm9820wm9820wm.png
Warning: Failed to decode Exif metadata.
File name : Gemini_Generated_Image_20wm9820wm9820wm.png
File size : 1705405 Bytes
MIME type : image/png
Image size : 1024 x 832
Gemini_Generated_Image_20wm9820wm9820wm.png: No Exif data found in the file
For what it's worth, ImageMagick doesn't print a warning, and magick identify -debug all -verbose Gemini_Generated_Image_20wm9820wm9820wm.png
prints out (or hallucinate 😉) exif details, mentioning an 8388-byte Profile-exif chunk and other chunks. Here's its output without -debug all
:
% identify -verbose Gemini_Generated_Image_20wm9820wm9820wm.png
Image:
Filename: Gemini_Generated_Image_20wm9820wm9820wm.png
Permissions: rw-r-----
Format: PNG (Portable Network Graphics)
Mime type: image/png
Class: DirectClass
Geometry: 1024x832+0+0
Units: Undefined
Colorspace: sRGB
Type: TrueColor
Endianness: Undefined
Depth: 8-bit
Channels: 3.0
Channel depth:
Red: 8-bit
Green: 8-bit
Blue: 8-bit
Channel statistics:
Pixels: 851968
Red:
min: 0 (0)
max: 255 (1)
mean: 124.214 (0.487113)
median: 110 (0.431373)
standard deviation: 50.6128 (0.198481)
kurtosis: -0.496617
skewness: 0.484408
entropy: 0.937417
Green:
min: 0 (0)
max: 255 (1)
mean: 136.91 (0.536903)
median: 152 (0.596078)
standard deviation: 50.5232 (0.19813)
kurtosis: -0.516282
skewness: -0.440673
entropy: 0.928334
Blue:
min: 0 (0)
max: 255 (1)
mean: 140.919 (0.552622)
median: 124 (0.486275)
standard deviation: 83.9452 (0.329197)
kurtosis: -1.46191
skewness: 0.129399
entropy: 0.928267
Image statistics:
Overall:
min: 0 (0)
max: 255 (1)
mean: 134.014 (0.525546)
median: 128.667 (0.504575)
standard deviation: 61.6937 (0.241936)
kurtosis: -0.824937
skewness: 0.0577114
entropy: 0.931339
Rendering intent: Perceptual
Gamma: 0.454545
Chromaticity:
red primary: (0.64,0.33,0.03)
green primary: (0.3,0.6,0.1)
blue primary: (0.15,0.06,0.79)
white point: (0.3127,0.329,0.3583)
Matte color: grey74
Background color: white
Border color: srgb(223,223,223)
Transparent color: black
Interlace: None
Intensity: Undefined
Compose: Over
Page geometry: 1024x832+0+0
Dispose: Undefined
Iterations: 0
Compression: Zip
Orientation: TopLeft
Profiles:
Profile-exif: 8388 bytes
Profile-xmp: 796 bytes
Properties:
date:create: 2025-08-11T20:07:04+00:00
date:modify: 2025-08-11T03:22:07+00:00
date:timestamp: 2025-08-11T20:19:17+00:00
exif:ColorSpace: 1
exif:ExifOffset: 58
exif:ExifVersion: 0220
exif:ImageUniqueID: 1d4646cec8a4defa0000000000000000
exif:InteroperabilityOffset: 170
exif:PixelXDimension: 1024
exif:PixelYDimension: 832
exif:Software: Picasa
exif:thumbnail:Compression: 6
exif:thumbnail:InteroperabilityIndex: R98
exif:thumbnail:InteroperabilityVersion: 0100
exif:thumbnail:JPEGInterchangeFormat: 294
exif:thumbnail:JPEGInterchangeFormatLength: 8088
exif:thumbnail:ResolutionUnit: 2
exif:thumbnail:XResolution: 72/1
exif:thumbnail:YResolution: 72/1
png:IHDR.bit-depth-orig: 8
png:IHDR.bit_depth: 8
png:IHDR.color-type-orig: 2
png:IHDR.color_type: 2 (Truecolor)
png:IHDR.interlace_method: 0 (Not interlaced)
png:IHDR.width,height: 1024, 832
png:text: 1 tEXt/zTXt/iTXt chunks were found
png:text-encoded profiles: 1 were found
signature: 8769c91eddd1fc2f016bbece7a4fb3c1633de398fda3535cbd5d857eb1d29d4a
Artifacts:
verbose: true
Tainted: False
Filesize: 1.6264MiB
Number pixels: 851968
Pixel cache type: Memory
Pixels per second: 21.4225MP
User time: 0.040u
Elapsed time: 0:01.039
Version: ImageMagick 7.1.1-47 Q16-HDRI x86_64 22763 https://imagemagick.org