Call GetAlpha() to get a pointer instead of checking for alpha first.
It's safe to call GetAlpha() even if there's no alpha because in that case NULL will be returned. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68939 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -411,7 +411,7 @@ bool wxTIFFHandler::LoadFile( wxImage *image, wxInputStream& stream, bool verbos
|
||||
unsigned char *ptr = image->GetData();
|
||||
ptr += w*3*(h-1);
|
||||
|
||||
unsigned char *alpha = hasAlpha ? image->GetAlpha() : NULL;
|
||||
unsigned char *alpha = image->GetAlpha();
|
||||
if ( hasAlpha )
|
||||
alpha += w*(h-1);
|
||||
|
||||
|
Reference in New Issue
Block a user