I discovered today that a script using the GH_MemoryBitmap class is no longer working. It was working last year when I wrote it, and I don’t know when it stopped (I don’t use it regularly). Now anything I run through a GH_MemoryBitmap ends up as a null on the other side.
I had been using this class to do simple bitmap operations (greyscale filters, contrast change). Here’s an example that should produce a greyscale version of the input bitmap.
private void RunScript(System.Object bitmap, ref object Bmp)
{
if ( bitmap != null ) {
System.Drawing.Bitmap img = bitmap as System.Drawing.Bitmap;
System.Drawing.Bitmap bitCopy = (System.Drawing.Bitmap) img.Clone();
GH_MemoryBitmap mem = new GH_MemoryBitmap(bitCopy);
mem.Filter_GreyScale();
mem.Release(true);
Bmp = bitCopy;
}
}
Anyone else having a similar issue? Any reason this would have changed recently? Using Windows 10 with Rhino Version 7 SR19
(7.19.22165.13001, 2022-06-14)
Thanks!