// we don't dare premultiplied alpha yet
 #define wxMAC_USE_PREMULTIPLIED_ALPHA 0
 
+#if wxUSE_BMPBUTTON
+
 void wxMacCreateBitmapButton( ControlButtonContentInfo*info , const wxBitmap& bitmap , int forceType )
 {
     memset( info , 0 , sizeof(ControlButtonContentInfo) ) ;
     }
 }
 
+#endif //wxUSE_BMPBUTTON
+
 #define M_BITMAPDATA ((wxBitmapRefData *)m_refData)
 
 void wxBitmapRefData::Init()
         // transform into IconRef
     
         static int iconCounter = 2 ;        
-        OSStatus err = RegisterIconRefFromIconFamily( 'WXNG' , (OSType) iconCounter, iconFamily, &m_iconRef ) ;
+#ifdef __WXDEBUG__
+        OSStatus err = 
+#endif
+            RegisterIconRefFromIconFamily( 'WXNG' , (OSType) iconCounter, iconFamily, &m_iconRef ) ;
         wxASSERT_MSG( err == noErr , wxT("Error when adding bitmap") ) ;
         // we have to retain a reference, as Unregister will decrement it 
         AcquireIconRef( m_iconRef ) ;
 
 bool wxBitmap::CreateFromXpm(const char **bits)
 {
+#if wxUSE_IMAGE
     wxCHECK_MSG( bits != NULL, FALSE, wxT("invalid bitmap data") )
     wxXPMDecoder decoder;
     wxImage img = decoder.ReadData(bits);
     wxCHECK_MSG( img.Ok(), FALSE, wxT("invalid bitmap data") )
     *this = wxBitmap(img);
     return TRUE;
+#else
+    return FALSE;
+#endif
 }
 
 #ifdef __WXMAC_OSX__
     }
     else
     {
+#if wxUSE_IMAGE
         wxImage loadimage(filename, type);
         if (loadimage.Ok()) {
             *this = loadimage;
             return true;
         }
+#endif
     }
     wxLogWarning(wxT("no bitmap handler for type %d defined."), type);
     return false;
     return handler->Create(this, data, type, width, height, depth);
 }
 
+#if wxUSE_IMAGE
+
 wxBitmap::wxBitmap(const wxImage& image, int depth)
 {
     wxCHECK_RET( image.Ok(), wxT("invalid image") )
     return image;
 }
 
+#endif //wxUSE_IMAGE
 
 bool wxBitmap::SaveFile(const wxString& filename, wxBitmapType type,
                         const wxPalette *palette) const
     }
     else
     {
+#if wxUSE_IMAGE
         wxImage image = ConvertToImage();
-
         return image.SaveFile(filename, type);
+#endif
     }
 
     wxLogWarning(wxT("no bitmap handler for type %d defined."), type);