From b4918747ef670a5fdb80e06df6e84d746b1ead29 Mon Sep 17 00:00:00 2001 From: David Elliott Date: Tue, 11 Jan 2005 15:07:02 +0000 Subject: [PATCH] Corrected m_depth assignment in CopyFromIcon git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31315 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/cocoa/bitmap.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.45.2