Gets a new instance of the bitmap class from an unknown class.
|any class||unknownImage||An instance of an unknown class.|
|bitmap||A new instance of bitmap class which was initialized.|
Following is a sample code using the clipboard and cbimage classes included in Rtype.ClipboardGX.dll.
This code assumes that Rtype.ClipboardGX.dll is embedded in Cooker and there is an image on the clipboard.
Since Rtype.ClipboardGX.dll is not always embedded in Cooker, bitmap and cbimage can not assume each other's existence.
That is, cbimage is an unknown class for bitmap.
cbimage cbim = cp.GetImage();
bitmap bmp = new bitmap(cbim);
This code works fine.
That is, it is possible to convert arguments of unknown class into bitmap by using this fitter.
An unknown class which is an argument must be implemented internally so that implicit type conversion to System.Drawing.Bitmap is possible.
Please refer to the documentation of each class whether the class can be implicitly converted to System.Drawing.Bitmap.
An instance returned with this fitter has already been initialized.
Links for reference