-
Notifications
You must be signed in to change notification settings - Fork 297
Open
Labels
Description
Describe the bug
ICC profile name is stored in a private var profileName_. Its value is set when reading a PNG file but it should also read a value from an ICC profile. Current implementation provides tools to modify ICC profile but makes changing the name of the profile impossible.
To Reproduce
Steps to reproduce the behavior:
- Load a png without a profile. profileName_ is set to empty.
- use setICCProfile(), profile data is modified but profileName_ remains empty
- profile name after the iccp chunk name is exported empty which makes ICC unrecognizable by Chrome, Firefox, Photoshop.
iCCP�� (69 43 43 50 00 00 in hex ed)
Line where profileName_ is setLine 450 in 6e56ec1
profileName_ = std::string(chunkData.c_str(), iccOffset - 1);
Line where profileName_ is usedLine 613 in 6e56ec1
outIo.write(reinterpret_cast<const byte*>(profileName_.data()), nameLength) != nameLength ||
Expected behavior
Expecting profileName_ from profile data or at least a method to set a new profileName_