{
IntPtr graphics;
- if (image == null) throw new ArgumentException ();
-
- if ((image.PixelFormat & PixelFormat.Indexed) != PixelFormat.Undefined) {\r
- // And MS ignores its own rules again\r
- throw new Exception ("A Graphics object cannot be created from an image that has an indexed pixel format");\r
- }\r
+ if (image == null)
+ throw new ArgumentNullException ();
Status status = GDIPlus.GdipGetImageGraphicsContext (image.nativeObject, out graphics);
GDIPlus.CheckStatus (status);