|
|
|
@ -476,10 +476,11 @@ DataBuf PngChunk::readRawProfile(const DataBuf& text, bool iTXt) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
DataBuf info;
|
|
|
|
|
unsigned char unhex[103] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3,
|
|
|
|
|
4, 5, 6, 7, 8, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 11, 12, 13, 14, 15};
|
|
|
|
|
const unsigned char unhex[103] = {
|
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 11, 12, 13, 14, 15,
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
if (iTXt) {
|
|
|
|
|
info.alloc(text.size());
|
|
|
|
@ -581,7 +582,7 @@ DataBuf PngChunk::readRawProfile(const DataBuf& text, bool iTXt) {
|
|
|
|
|
} // PngChunk::readRawProfile
|
|
|
|
|
|
|
|
|
|
std::string PngChunk::writeRawProfile(const std::string& profileData, const char* profileType) {
|
|
|
|
|
static byte hex[16] = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'};
|
|
|
|
|
static const byte hex[16] = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'};
|
|
|
|
|
|
|
|
|
|
std::ostringstream oss;
|
|
|
|
|
oss << '\n' << profileType << '\n' << std::setw(8) << profileData.size();
|
|
|
|
|