From a227fcda393e2ac55e98986e6315e86360ab2b5d Mon Sep 17 00:00:00 2001 From: Luis Diaz Mas Date: Sat, 19 May 2018 19:38:36 +0200 Subject: [PATCH] debug: Add new debug message to print the PNG chunk being processed --- src/pngimage.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/pngimage.cpp b/src/pngimage.cpp index 3d4c3dfd..17de5bf8 100644 --- a/src/pngimage.cpp +++ b/src/pngimage.cpp @@ -412,8 +412,12 @@ namespace Exiv2 { throw Exiv2::Error(kerFailedToReadImageData); } - // Perform a chunk triage for item that we need. +#ifdef DEBUG + std::string chunkName(reinterpret_cast(cheaderBuf.pData_) + 4, 4); + std::cout << "Exiv2::PngImage::readMetadata: chunk name: " << chunkName << std::endl; +#endif + // Perform a chunk triage for item that we need. if (!memcmp(cheaderBuf.pData_ + 4, "IEND", 4) || !memcmp(cheaderBuf.pData_ + 4, "IHDR", 4) || !memcmp(cheaderBuf.pData_ + 4, "tEXt", 4) ||