+bool wxBitmap::Create(NSImage* cocoaNSImage)
+{
+ wxAutoNSAutoreleasePool pool;
+ NSBitmapImageRep *bitmapImageRep = [NSBitmapImageRep imageRepWithData:[cocoaNSImage TIFFRepresentation]];
+ return Create(bitmapImageRep);
+}
+
+bool wxBitmap::Create(NSBitmapImageRep *imageRep)
+{
+ UnRef();
+ m_refData = new wxBitmapRefData;
+ if(imageRep != nil)
+ {
+ M_BITMAPDATA->m_width = [imageRep pixelsWide];
+ M_BITMAPDATA->m_height = [imageRep pixelsHigh];
+ M_BITMAPDATA->m_depth = [imageRep bitsPerPixel];
+ M_BITMAPDATA->m_ok = true;
+ M_BITMAPDATA->m_numColors = 0;
+ M_BITMAPDATA->m_quality = 0;
+ M_BITMAPDATA->m_cocoaNSBitmapImageRep = wxGCSafeRetain(imageRep);
+ M_BITMAPDATA->m_bitmapMask = NULL;
+ return true;
+ }
+ else
+ return false;
+}
+