Fixed copying only 1/3 of scanline when saving TIFF image in rare cases.
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
This commit is contained in:
parent
f60e313437
commit
a000de7794
@ -727,7 +727,7 @@ bool wxTIFFHandler::SaveFile( wxImage *image, wxOutputStream& stream, bool verbo
|
||||
if (isColouredImage)
|
||||
{
|
||||
// color image
|
||||
memcpy(buf, ptr, image->GetWidth());
|
||||
memcpy(buf, ptr, image->GetWidth() * 3);
|
||||
}
|
||||
else if (spp * bps == 8) // greyscale image
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user