Clang-format in pngchunk_int.cpp

main
Luis Díaz Más 3 years ago
parent ddf5645c5d
commit 240a72468e

@ -22,28 +22,28 @@
#include "config.h"
#ifdef EXV_HAVE_LIBZ
#include "pngchunk_int.hpp"
#include "tiffimage.hpp"
#include "jpgimage.hpp"
#include "exif.hpp"
#include "iptc.hpp"
#include "image.hpp"
#include "error.hpp"
#include "enforce.hpp"
#include "error.hpp"
#include "exif.hpp"
#include "helper_functions.hpp"
#include "image.hpp"
#include "iptc.hpp"
#include "jpgimage.hpp"
#include "pngchunk_int.hpp"
#include "safe_op.hpp"
#include "tiffimage.hpp"
// + standard includes
#include <sstream>
#include <iomanip>
#include <string>
#include <cstring>
#include <iostream>
#include <zlib.h> // To uncompress or compress text chunk
// standard includes
#include <algorithm>
#include <cassert>
#include <cstdio>
#include <algorithm>
#include <zlib.h> // To uncompress or compress text chunk
#include <cstring>
#include <iomanip>
#include <iostream>
#include <sstream>
#include <string>
/*
@ -54,18 +54,18 @@ iTXt chunk : http://www.vias.org/pngguide/chapter11_05.html
PNG tags : http://www.sno.phy.queensu.ca/~phil/exiftool/TagNames/PNG.html#TextualData
*/
namespace {
constexpr int nullSeparators = 2;
namespace
{
constexpr int nullSeparators = 2;
}
// *****************************************************************************
// class member definitions
namespace Exiv2 {
namespace Internal {
void PngChunk::decodeIHDRChunk(const DataBuf& data,
int* outWidth,
int* outHeight)
namespace Exiv2
{
namespace Internal
{
void PngChunk::decodeIHDRChunk(const DataBuf& data, int* outWidth, int* outHeight)
{
assert(data.size() >= 8);
@ -73,35 +73,29 @@ namespace Exiv2 {
*outWidth = data.read_uint32(0, bigEndian);
*outHeight = data.read_uint32(4, bigEndian);
}
void PngChunk::decodeTXTChunk(Image* pImage,
const DataBuf& data,
TxtChunkType type)
void PngChunk::decodeTXTChunk(Image* pImage, const DataBuf& data, TxtChunkType type)
{
DataBuf key = keyTXTChunk(data);
DataBuf arr = parseTXTChunk(data, key.size(), type);
#ifdef EXIV2_DEBUG_MESSAGES
std::cout << "Exiv2::PngChunk::decodeTXTChunk: TXT chunk data: "
<< std::string(arr.c_str(), arr.size()) << std::endl;
std::cout << "Exiv2::PngChunk::decodeTXTChunk: TXT chunk data: " << std::string(arr.c_str(), arr.size())
<< std::endl;
#endif
parseChunkContent(pImage, key.c_data(), key.size(), arr);
}
DataBuf PngChunk::decodeTXTChunk(const DataBuf& data,
TxtChunkType type)
DataBuf PngChunk::decodeTXTChunk(const DataBuf& data, TxtChunkType type)
{
DataBuf key = keyTXTChunk(data);
#ifdef EXIV2_DEBUG_MESSAGES
std::cout << "Exiv2::PngChunk::decodeTXTChunk: TXT chunk key: "
<< std::string(key.c_str(), key.size()) << std::endl;
std::cout << "Exiv2::PngChunk::decodeTXTChunk: TXT chunk key: " << std::string(key.c_str(), key.size())
<< std::endl;
#endif
return parseTXTChunk(data, key.size(), type);
}
DataBuf PngChunk::keyTXTChunk(const DataBuf& data, bool stripHeader)
@ -113,7 +107,7 @@ namespace Exiv2 {
// Search for null char until the end of the DataBuf
const byte* dataPtr = data.c_data();
int keysize=offset;
int keysize = offset;
while (dataPtr[keysize] != 0 && keysize < data.size()) {
keysize++;
}
@ -121,25 +115,21 @@ namespace Exiv2 {
if (keysize == data.size())
throw Error(kerFailedToReadImageData);
return DataBuf(dataPtr+offset, keysize-offset);
return DataBuf(dataPtr + offset, keysize - offset);
}
DataBuf PngChunk::parseTXTChunk(const DataBuf& data,
int keysize,
TxtChunkType type)
DataBuf PngChunk::parseTXTChunk(const DataBuf& data, int keysize, TxtChunkType type)
{
DataBuf arr;
if(type == zTXt_Chunk)
{
if (type == zTXt_Chunk) {
enforce(data.size() >= Safe::add(keysize, nullSeparators), Exiv2::kerCorruptedMetadata);
// Extract a deflate compressed Latin-1 text chunk
// we get the compression method after the key
const byte* compressionMethod = data.c_data(keysize + 1);
if ( *compressionMethod != 0x00 )
{
if (*compressionMethod != 0x00) {
// then it isn't zlib compressed and we are sunk
#ifdef EXIV2_DEBUG_MESSAGES
std::cerr << "Exiv2::PngChunk::parseTXTChunk: Non-standard zTXt compression method.\n";
@ -153,9 +143,7 @@ namespace Exiv2 {
enforce(compressedTextSize < data.size(), kerCorruptedMetadata);
zlibUncompress(compressedText, compressedTextSize, arr);
}
else if(type == tEXt_Chunk)
{
} else if (type == tEXt_Chunk) {
enforce(data.size() >= Safe::add(keysize, 1), Exiv2::kerCorruptedMetadata);
// Extract a non-compressed Latin-1 text chunk
@ -164,11 +152,9 @@ namespace Exiv2 {
long textsize = data.size() - keysize - 1;
arr = DataBuf(text, textsize);
}
else if(type == iTXt_Chunk)
{
} else if (type == iTXt_Chunk) {
enforce(data.size() >= Safe::add(keysize, 3), Exiv2::kerCorruptedMetadata);
const size_t nullCount = std::count(data.c_data(keysize+3), data.c_data(data.size()), '\0');
const size_t nullCount = std::count(data.c_data(keysize + 3), data.c_data(data.size()), '\0');
enforce(nullCount >= nullSeparators, Exiv2::kerCorruptedMetadata);
// Extract a deflate compressed or uncompressed UTF-8 text chunk
@ -183,8 +169,8 @@ namespace Exiv2 {
// language description string after the compression technique spec
const size_t languageTextMaxSize = data.size() - keysize - 3;
std::string languageText = string_from_unterminated(
data.c_str(Safe::add(keysize, 3)), languageTextMaxSize);
std::string languageText =
string_from_unterminated(data.c_str(Safe::add(keysize, 3)), languageTextMaxSize);
const size_t languageTextSize = languageText.size();
enforce(static_cast<unsigned long>(data.size()) >=
@ -192,8 +178,7 @@ namespace Exiv2 {
Exiv2::kerCorruptedMetadata);
// translated keyword string after the language description
std::string translatedKeyText = string_from_unterminated(
data.c_str(keysize + 3 + languageTextSize + 1),
data.size() - (keysize + 3 + languageTextSize + 1));
data.c_str(keysize + 3 + languageTextSize + 1), data.size() - (keysize + 3 + languageTextSize + 1));
const auto translatedKeyTextSize = static_cast<unsigned int>(translatedKeyText.size());
if ((compressionFlag == 0x00) || (compressionFlag == 0x01 && compressionMethod == 0x00)) {
@ -202,7 +187,8 @@ namespace Exiv2 {
Exiv2::kerCorruptedMetadata);
const byte* text = data.c_data(keysize + 3 + languageTextSize + 1 + translatedKeyTextSize + 1);
const long textsize = static_cast<long>(data.size() - (keysize + 3 + languageTextSize + 1 + translatedKeyTextSize + 1));
const long textsize = static_cast<long>(
data.size() - (keysize + 3 + languageTextSize + 1 + translatedKeyTextSize + 1));
if (compressionFlag == 0x00) {
// then it's an uncompressed iTXt chunk
@ -228,9 +214,7 @@ namespace Exiv2 {
#endif
throw Error(kerFailedToReadImageData);
}
}
else
{
} else {
#ifdef DEBUG
std::cerr << "Exiv2::PngChunk::parseTXTChunk: We found a field, not expected though\n";
#endif
@ -244,24 +228,20 @@ namespace Exiv2 {
{
// We look if an ImageMagick EXIF raw profile exist.
if ( keySize >= 21
&& ( memcmp("Raw profile type exif", key, 21) == 0
|| memcmp("Raw profile type APP1", key, 21) == 0)
&& pImage->exifData().empty())
{
DataBuf exifData = readRawProfile(arr,false);
if (keySize >= 21 &&
(memcmp("Raw profile type exif", key, 21) == 0 || memcmp("Raw profile type APP1", key, 21) == 0) &&
pImage->exifData().empty()) {
DataBuf exifData = readRawProfile(arr, false);
long length = exifData.size();
if (length > 0)
{
if (length > 0) {
// Find the position of Exif header in bytes array.
const byte exifHeader[] = { 0x45, 0x78, 0x69, 0x66, 0x00, 0x00 };
const byte exifHeader[] = {0x45, 0x78, 0x69, 0x66, 0x00, 0x00};
long pos = -1;
for (long i = 0; i < length - static_cast<long>(sizeof(exifHeader)); i++) {
if (exifData.cmpBytes(i, exifHeader, sizeof(exifHeader)) == 0)
{
if (exifData.cmpBytes(i, exifHeader, sizeof(exifHeader)) == 0) {
pos = i;
break;
}
@ -269,21 +249,16 @@ namespace Exiv2 {
// If found it, store only these data at from this place.
if (pos !=-1)
{
if (pos != -1) {
#ifdef EXIV2_DEBUG_MESSAGES
std::cout << "Exiv2::PngChunk::parseChunkContent: Exif header found at position " << pos << "\n";
std::cout << "Exiv2::PngChunk::parseChunkContent: Exif header found at position " << pos
<< "\n";
#endif
pos = pos + sizeof(exifHeader);
ByteOrder bo = TiffParser::decode(pImage->exifData(),
pImage->iptcData(),
pImage->xmpData(),
exifData.c_data(pos),
length - pos);
ByteOrder bo = TiffParser::decode(pImage->exifData(), pImage->iptcData(), pImage->xmpData(),
exifData.c_data(pos), length - pos);
pImage->setByteOrder(bo);
}
else
{
} else {
#ifndef SUPPRESS_WARNINGS
EXV_WARNING << "Failed to decode Exif metadata.\n";
#endif
@ -294,10 +269,8 @@ namespace Exiv2 {
// We look if an ImageMagick IPTC raw profile exist.
if ( keySize >= 21
&& memcmp("Raw profile type iptc", key, 21) == 0
&& pImage->iptcData().empty()) {
DataBuf psData = readRawProfile(arr,false);
if (keySize >= 21 && memcmp("Raw profile type iptc", key, 21) == 0 && pImage->iptcData().empty()) {
DataBuf psData = readRawProfile(arr, false);
if (psData.size() > 0) {
Blob iptcBlob;
const byte* record = nullptr;
@ -306,12 +279,8 @@ namespace Exiv2 {
const byte* pEnd = psData.c_data(psData.size());
const byte* pCur = psData.c_data();
while ( pCur < pEnd
&& 0 == Photoshop::locateIptcIrb(pCur,
static_cast<long>(pEnd - pCur),
&record,
&sizeHdr,
&sizeIptc)) {
while (pCur < pEnd && 0 == Photoshop::locateIptcIrb(pCur, static_cast<long>(pEnd - pCur), &record,
&sizeHdr, &sizeIptc)) {
if (sizeIptc) {
#ifdef EXIV2_DEBUG_MESSAGES
std::cerr << "Found IPTC IRB, size = " << sizeIptc << "\n";
@ -329,10 +298,7 @@ namespace Exiv2 {
pImage->clearIptcData();
}
// If there is no IRB, try to decode the complete chunk data
if ( iptcBlob.empty()
&& IptcParser::decode(pImage->iptcData(),
psData.c_data(),
psData.size())) {
if (iptcBlob.empty() && IptcParser::decode(pImage->iptcData(), psData.c_data(), psData.size())) {
#ifndef SUPPRESS_WARNINGS
EXV_WARNING << "Failed to decode IPTC metadata.\n";
#endif
@ -343,28 +309,21 @@ namespace Exiv2 {
// We look if an ImageMagick XMP raw profile exist.
if ( keySize >= 20
&& memcmp("Raw profile type xmp", key, 20) == 0
&& pImage->xmpData().empty())
{
DataBuf xmpBuf = readRawProfile(arr,false);
if (keySize >= 20 && memcmp("Raw profile type xmp", key, 20) == 0 && pImage->xmpData().empty()) {
DataBuf xmpBuf = readRawProfile(arr, false);
long length = xmpBuf.size();
if (length > 0)
{
if (length > 0) {
std::string& xmpPacket = pImage->xmpPacket();
xmpPacket.assign(xmpBuf.c_str(), length);
std::string::size_type idx = xmpPacket.find_first_of('<');
if (idx != std::string::npos && idx > 0)
{
if (idx != std::string::npos && idx > 0) {
#ifndef SUPPRESS_WARNINGS
EXV_WARNING << "Removing " << idx
<< " characters from the beginning of the XMP packet\n";
EXV_WARNING << "Removing " << idx << " characters from the beginning of the XMP packet\n";
#endif
xmpPacket = xmpPacket.substr(idx);
}
if (XmpParser::decode(pImage->xmpData(), xmpPacket))
{
if (XmpParser::decode(pImage->xmpData(), xmpPacket)) {
#ifndef SUPPRESS_WARNINGS
EXV_WARNING << "Failed to decode XMP metadata.\n";
#endif
@ -374,25 +333,19 @@ namespace Exiv2 {
// We look if an Adobe XMP string exist.
if ( keySize >= 17
&& memcmp("XML:com.adobe.xmp", key, 17) == 0
&& pImage->xmpData().empty())
{
if (arr.size() > 0)
{
if (keySize >= 17 && memcmp("XML:com.adobe.xmp", key, 17) == 0 && pImage->xmpData().empty()) {
if (arr.size() > 0) {
std::string& xmpPacket = pImage->xmpPacket();
xmpPacket.assign(arr.c_str(), arr.size());
std::string::size_type idx = xmpPacket.find_first_of('<');
if (idx != std::string::npos && idx > 0)
{
if (idx != std::string::npos && idx > 0) {
#ifndef SUPPRESS_WARNINGS
EXV_WARNING << "Removing " << idx << " characters "
<< "from the beginning of the XMP packet\n";
#endif
xmpPacket = xmpPacket.substr(idx);
}
if (XmpParser::decode(pImage->xmpData(), xmpPacket))
{
if (XmpParser::decode(pImage->xmpData(), xmpPacket)) {
#ifndef SUPPRESS_WARNINGS
EXV_WARNING << "Failed to decode XMP metadata.\n";
#endif
@ -403,17 +356,13 @@ namespace Exiv2 {
// We look if a comments string exist. Note than we use only 'Description' keyword which
// is dedicaced to store long comments. 'Comment' keyword is ignored.
if ( keySize >= 11
&& memcmp("Description", key, 11) == 0
&& pImage->comment().empty())
{
if (keySize >= 11 && memcmp("Description", key, 11) == 0 && pImage->comment().empty()) {
pImage->setComment(std::string(arr.c_str(), arr.size()));
}
} // PngChunk::parseChunkContent
std::string PngChunk::makeMetadataChunk(const std::string& metadata,
MetadataId type)
std::string PngChunk::makeMetadataChunk(const std::string& metadata, MetadataId type)
{
std::string chunk;
std::string rawProfile;
@ -443,9 +392,7 @@ namespace Exiv2 {
} // PngChunk::makeMetadataChunk
void PngChunk::zlibUncompress(const byte* compressedText,
unsigned int compressedTextSize,
DataBuf& arr)
void PngChunk::zlibUncompress(const byte* compressedText, unsigned int compressedTextSize, DataBuf& arr)
{
uLongf uncompressedLen = compressedTextSize * 2; // just a starting point
int zlibResult;
@ -453,29 +400,24 @@ namespace Exiv2 {
do {
arr.alloc(uncompressedLen);
zlibResult = uncompress(arr.data(),
&uncompressedLen,
compressedText,
compressedTextSize);
zlibResult = uncompress(arr.data(), &uncompressedLen, compressedText, compressedTextSize);
if (zlibResult == Z_OK) {
assert((uLongf)arr.size() >= uncompressedLen);
arr.resize(uncompressedLen);
}
else if (zlibResult == Z_BUF_ERROR) {
} else if (zlibResult == Z_BUF_ERROR) {
// the uncompressedArray needs to be larger
uncompressedLen *= 2;
// DoS protection. can't be bigger than 64k
if (uncompressedLen > 131072) {
if (++dos > 1) break;
if (++dos > 1)
break;
uncompressedLen = 131072;
}
}
else {
} else {
// something bad happened
throw Error(kerFailedToReadImageData);
}
}
while (zlibResult == Z_BUF_ERROR);
} while (zlibResult == Z_BUF_ERROR);
if (zlibResult != Z_OK) {
throw Error(kerFailedToReadImageData);
@ -505,7 +447,8 @@ namespace Exiv2 {
#endif
compressedLen *= 2;
// DoS protection. Cap max compressed size
if ( compressedLen > 131072 ) throw Error(kerFailedToReadImageData);
if (compressedLen > 131072)
throw Error(kerFailedToReadImageData);
break;
default:
// Something bad happened
@ -517,9 +460,7 @@ namespace Exiv2 {
} // PngChunk::zlibCompress
std::string PngChunk::makeAsciiTxtChunk(const std::string& keyword,
const std::string& text,
bool compress)
std::string PngChunk::makeAsciiTxtChunk(const std::string& keyword, const std::string& text, bool compress)
{
// Chunk structure: length (4 bytes) + chunk type + chunk data + CRC (4 bytes)
// Length is the size of the chunk data
@ -537,8 +478,7 @@ namespace Exiv2 {
if (compress) {
chunkData += '\0' + zlibCompress(text);
chunkType = "zTXt";
}
else {
} else {
chunkData += text;
chunkType = "tEXt";
}
@ -557,9 +497,7 @@ namespace Exiv2 {
} // PngChunk::makeAsciiTxtChunk
std::string PngChunk::makeUtf8TxtChunk(const std::string& keyword,
const std::string& text,
bool compress)
std::string PngChunk::makeUtf8TxtChunk(const std::string& keyword, const std::string& text, bool compress)
{
// Chunk structure: length (4 bytes) + chunk type + chunk data + CRC (4 bytes)
// Length is the size of the chunk data
@ -572,11 +510,10 @@ namespace Exiv2 {
// Build chunk data, determine chunk type
std::string chunkData = keyword;
if (compress) {
static const char flags[] = { 0x00, 0x01, 0x00, 0x00, 0x00 };
static const char flags[] = {0x00, 0x01, 0x00, 0x00, 0x00};
chunkData += std::string(flags, 5) + zlibCompress(text);
}
else {
static const char flags[] = { 0x00, 0x00, 0x00, 0x00, 0x00 };
} else {
static const char flags[] = {0x00, 0x00, 0x00, 0x00, 0x00};
chunkData += std::string(flags, 5) + text;
}
// Determine length of the chunk data
@ -595,20 +532,19 @@ namespace Exiv2 {
} // PngChunk::makeUtf8TxtChunk
DataBuf PngChunk::readRawProfile(const DataBuf& text,bool iTXt)
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};
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 (text.size() == 0) {
return DataBuf();
}
if ( iTXt ) {
if (iTXt) {
info.alloc(text.size());
info.copyBytes(0, text.c_data(), text.size());
return info;
@ -622,33 +558,28 @@ namespace Exiv2 {
}
// Look for newline
while (*sp != '\n')
{
while (*sp != '\n') {
sp++;
if ( sp == eot )
{
if (sp == eot) {
return DataBuf();
}
}
sp++ ; // step over '\n'
sp++; // step over '\n'
if (sp == eot) {
return DataBuf();
}
// Look for length
while (*sp == '\0' || *sp == ' ' || *sp == '\n')
{
while (*sp == '\0' || *sp == ' ' || *sp == '\n') {
sp++;
if (sp == eot )
{
if (sp == eot) {
return DataBuf();
}
}
// Parse the length.
long length = 0;
while ('0' <= *sp && *sp <= '9')
{
while ('0' <= *sp && *sp <= '9') {
// Compute the new length using unsigned long, so that we can
// check for overflow.
const unsigned long newlength = (10 * static_cast<unsigned long>(length)) + (*sp - '0');
@ -657,28 +588,25 @@ namespace Exiv2 {
}
length = static_cast<long>(newlength);
sp++;
if (sp == eot )
{
if (sp == eot) {
return DataBuf();
}
}
sp++ ; // step over '\n'
sp++; // step over '\n'
if (sp == eot) {
return DataBuf();
}
enforce(length <= (eot - sp)/2, Exiv2::kerCorruptedMetadata);
enforce(length <= (eot - sp) / 2, Exiv2::kerCorruptedMetadata);
// Allocate space
if (length == 0)
{
if (length == 0) {
#ifdef EXIV2_DEBUG_MESSAGES
std::cerr << "Exiv2::PngChunk::readRawProfile: Unable To Copy Raw Profile: invalid profile length\n";
#endif
}
info.alloc(length);
if (info.size() != length)
{
if (info.size() != length) {
#ifdef EXIV2_DEBUG_MESSAGES
std::cerr << "Exiv2::PngChunk::readRawProfile: Unable To Copy Raw Profile: cannot allocate memory\n";
#endif
@ -687,15 +615,13 @@ namespace Exiv2 {
// Copy profile, skipping white space and column 1 "=" signs
unsigned char *dp = info.data(); // decode pointer
unsigned char* dp = info.data(); // decode pointer
unsigned int nibbles = length * 2;
for (long i = 0; i < static_cast<long>(nibbles); i++) {
enforce(sp < eot, Exiv2::kerCorruptedMetadata);
while (*sp < '0' || (*sp > '9' && *sp < 'a') || *sp > 'f')
{
if (*sp == '\0')
{
while (*sp < '0' || (*sp > '9' && *sp < 'a') || *sp > 'f') {
if (*sp == '\0') {
#ifdef EXIV2_DEBUG_MESSAGES
std::cerr << "Exiv2::PngChunk::readRawProfile: Unable To Copy Raw Profile: ran out of data\n";
#endif
@ -706,7 +632,7 @@ namespace Exiv2 {
enforce(sp < eot, Exiv2::kerCorruptedMetadata);
}
if (i%2 == 0)
if (i % 2 == 0)
*dp = static_cast<unsigned char>(16 * unhex[static_cast<int>(*sp++)]);
else
(*dp++) += unhex[static_cast<int>(*sp++)];
@ -716,16 +642,16 @@ namespace Exiv2 {
} // PngChunk::readRawProfile
std::string PngChunk::writeRawProfile(const std::string& profileData,
const char* profileType)
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 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();
const char* sp = profileData.data();
for (std::string::size_type i = 0; i < profileData.size(); ++i) {
if (i % 36 == 0) oss << '\n';
if (i % 36 == 0)
oss << '\n';
oss << hex[((*sp >> 4) & 0x0f)];
oss << hex[((*sp++) & 0x0f)];
}
@ -737,4 +663,3 @@ namespace Exiv2 {
} // namespace Internal
} // namespace Exiv2
#endif // ifdef EXV_HAVE_LIBZ

Loading…
Cancel
Save