How to typecast System.Drawing.Bitmap into GH Bitmap in GHPython?

How can I change a System.Drawing.Bitmap into a “Bitmap” (as shown in the following screenshot after the “Bitmap” component), but in the GHPython code itself?

Should be one or two lines of code only. But I got stuck here.

I don’t think Grasshopper has a native bitmap parameter. Perhaps it’s from a plugin (i.e. that you might implement in your GHPython code)?

Ahhh - you’re right.

I was confused because the shown Bitmap component appears as a Primitive in the Params menu - just as if it was a native GH component. It is a pity that STRG+ALT clicking on that component does not help and the help file of the component is empty. So one could only guess where it came from (I guess it is from the Javid plugin).

Thanks for your help - now at least I know why I could not find a solution.

1 Like