[gdal-dev] Possible RGB 16-bit PNG read error?
Even Rouault
even.rouault at spatialys.com
Wed Dec 24 01:46:46 PST 2025
Ray,
what tool do you use to assess if the colors are wrong ? Doing
"gdal_translate 48bpp.png 48bpp.tif", and then opening in GIMP
48bpp.png, 48bpp.tif and 24bpp.tif, the colors are all identical. I see
that the 3 files have an ICC profile. Perhaps your visualization tool
doesn't honour it for the 16-bit version ?
Even
Le 24/12/2025 à 04:58, Ray at Daylon via gdal-dev a écrit :
> I came across a 16-bit RGB PNG file that appears to read incorrectly
> in GDAL 3.11.3. I didn't see any changes in the readme's for later
> GDAL versions in regards to this.
>
> The file content is okay but the colors are wrong. Looking at the band
> pixel data returned by GDAL, it might be similar to the endian issue
> that happened with 16-bit grayscale PNGs earlier, but applying endian
> corrections and RGB/BGR ordering on my end didn't help. Near as I can
> tell it looks like the channels are shifted in some other way.
>
> An example file is available at
> daylongraphics.com/download/test/gdal_png_issue/48bpp.png (554K)
>
> For reference, a correctly read 8-bit version is available at
> daylongraphics.com/download/test/gdal_png_issue/24bpp.png
>
> Ray Gardener
> Daylon Graphics Ltd.
>
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/gdal-dev
--
http://www.spatialys.com
My software is free, but my time generally not.
More information about the gdal-dev
mailing list