If our calculated image pitch is not equal to what TIFFScanlineSize returns a scanline buffer would be used. In that case the number of bytes being copied was equal to the image's width instead of pitch (width times 3).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68946
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
if (isColouredImage)
{
// color image
if (isColouredImage)
{
// color image
- memcpy(buf, ptr, image->GetWidth());
+ memcpy(buf, ptr, image->GetWidth() * 3);
}
else if (spp * bps == 8) // greyscale image
{
}
else if (spp * bps == 8) // greyscale image
{