Can't resolve wx.Bitmap.wxBITMAP_TYPE_PNG
Posted: Thu May 26, 2011 6:44 pm
I'm using wx.NET and need to convert an System.Drawing.Bitmap to a wx.Bitmap. I have some serialization code (C#) supplied by a wx.net maintainer, but Cobra is having trouble resolving an enum (wx.BitmapType.wxBITMAP_TYPE_PNG)
Here is the original C# statement that has the issue.
wxBitmapFromFxBitmap = new Bitmap(new Image(bitmapBytes, BitmapType.Png));
or
wxBitmapFromFxBitmap = new wx.Bitmap(new wx.Image(bitmapBytes, wx.BitmapType.Png));
If I use BitmapType.Png, I get the following error.
Cannot find a definition for "png" in "BitmapType" whose type is "BitmapType". There are members with similar names including ".wxBITMAP_TYPE_PNG" and ".wxBITMAP_TYPE_PNG_RESOURCE".
I notice the wx.net documentation says the BitmapType enum has identifiers such as wxBITMAP_TYPE_PNG, etc. If I use BitmapType.wxBITMAP_TYPE_PNG, I get the follwoing error.
"wx.BitmapType" does not contain a definition for "WxBITMAP_TYPE_INVALID"
"wx.BitmapType" does not contain a definition for "WxBITMAP_TYPE_PNG"
I'm not sure why the INVALID identifier is being referenced. Also notice the "Wx" ... not "wx".
Is this a Cobra issue ??
How can I fix this issue ??
Thanks, Brendan.
Here is the original C# statement that has the issue.
wxBitmapFromFxBitmap = new Bitmap(new Image(bitmapBytes, BitmapType.Png));
or
wxBitmapFromFxBitmap = new wx.Bitmap(new wx.Image(bitmapBytes, wx.BitmapType.Png));
If I use BitmapType.Png, I get the following error.
Cannot find a definition for "png" in "BitmapType" whose type is "BitmapType". There are members with similar names including ".wxBITMAP_TYPE_PNG" and ".wxBITMAP_TYPE_PNG_RESOURCE".
I notice the wx.net documentation says the BitmapType enum has identifiers such as wxBITMAP_TYPE_PNG, etc. If I use BitmapType.wxBITMAP_TYPE_PNG, I get the follwoing error.
"wx.BitmapType" does not contain a definition for "WxBITMAP_TYPE_INVALID"
"wx.BitmapType" does not contain a definition for "WxBITMAP_TYPE_PNG"
I'm not sure why the INVALID identifier is being referenced. Also notice the "Wx" ... not "wx".
Is this a Cobra issue ??
How can I fix this issue ??
Thanks, Brendan.