From: David Elliott Date: Tue, 11 Jan 2005 15:07:02 +0000 (+0000) Subject: Corrected m_depth assignment in CopyFromIcon X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/b4918747ef670a5fdb80e06df6e84d746b1ead29?ds=inline Corrected m_depth assignment in CopyFromIcon git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31315 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/cocoa/bitmap.mm b/src/cocoa/bitmap.mm index adcf08c262..4d5a1b05cc 100644 --- a/src/cocoa/bitmap.mm +++ b/src/cocoa/bitmap.mm @@ -371,7 +371,7 @@ bool wxBitmap::CopyFromIcon(const wxIcon& icon) M_BITMAPDATA->m_cocoaNSBitmapImageRep = newBitmapRep; M_BITMAPDATA->m_width = [newBitmapRep pixelsWide]; M_BITMAPDATA->m_height = [newBitmapRep pixelsHigh]; - M_BITMAPDATA->m_depth = [newBitmapRep bitsPerSample]; + M_BITMAPDATA->m_depth = [newBitmapRep bitsPerSample]*[newBitmapRep samplesPerPixel]; M_BITMAPDATA->m_ok = true; M_BITMAPDATA->m_numColors = 0; M_BITMAPDATA->m_quality = 0;