Closed fdncred closed 5 years ago
Oh, that's right. Bitmap does not support 1bit and the transfer is inmemory from writemem. The only way to handle is to convert to higher bpp and get the bitmap. Should be fixed in next release
Additionally with this I removed all (1,2,4,8,16,32)to (1,2,4,8,16,32) functions and replaced it with the more global to(1,2,4,8,16,32) function. Fixed in next release
I think it's a bad idea to convert 1-bpp to a higher bpp. People using this assembly will want to look at the data the way it is, not in a different format. We need a vb compatible version of what I already wrote in csharp. Just using marshalling instead of unsafe pointers.
Sure, thats all right. But this data is primary for display and File-Saving (Converts up internally). For further working with leptonica the original pix is untouched 1Bpp. 2Bpp works also out of the box. the main problem is the Bitmap.FromStream function which is not working with 1Bpp. i Updated to convertto2 as smallest possible value for working with the direct FromStream function which is the fastest way.
The ToBitmap() routine doesn't seem to work on 1-bpp bitonal images. All of these bitmaps silently fail. The function does not throw an exception but the bitmaps it creates are invalid.