Skip to content

Commit fe1fea0

Browse files
committed
fix(png): broken sRGB chunk detection
1 parent 4f37143 commit fe1fea0

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/imageio/PngImageLoader.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -543,7 +543,7 @@ Task<vector<ImageData>> PngImageLoader::load(istream& iStream, const fs::path&,
543543
resultData.nativeMetadata.chroma = rec709Chroma(); // default to Rec.709 primaries unless cHRM chunk says otherwise
544544

545545
int srgbIntent = 0;
546-
const bool hasChunkSrgb = png_get_sRGB(pngPtr, infoPtr, &srgbIntent) == PNG_INFO_iCCP;
546+
const bool hasChunkSrgb = png_get_sRGB(pngPtr, infoPtr, &srgbIntent) == PNG_INFO_sRGB;
547547

548548
double invGamma64 = 1.0 / 2.2;
549549
const bool hasChunkGama = png_get_gAMA(pngPtr, infoPtr, &invGamma64) == PNG_INFO_gAMA;

0 commit comments

Comments
 (0)