Skip to content

Commit

Permalink
add debug log
Browse files Browse the repository at this point in the history
  • Loading branch information
qbnu committed Jun 13, 2024
1 parent 6529fe9 commit eab4a2b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/JPEGView/PSDWrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,13 @@ CJPEGImage* PsdReader::ReadImage(LPCTSTR strFileName, bool& bOutOfMemory)
}

pOffset += _byteswap_ushort(*(unsigned short*)(pBuffer + (channel * nHeight + row) * 2));
#ifdef DEBUG
if (p != pOffset) {
WCHAR buf[100];
swprintf(buf, _T("Misaligned scan line bytes (%+d) for channel %d row %d\n"), p - pOffset, channel, row);
::OutputDebugString(buf);
}
#endif
}
}
} else { // No compression
Expand Down

0 comments on commit eab4a2b

Please sign in to comment.