SciSharp / NumSharp

High Performance Computation for N-D Tensors in .NET, similar API to NumPy.
https://github.com/SciSharp
Apache License 2.0
1.38k stars 192 forks source link

NumSharp.Bitmap support for odd sized bitmaps with odd sized bytes per pixel #460

Closed AmbachtIT closed 11 months ago

AmbachtIT commented 3 years ago

If both BPP and width of a bitmap are odd, the stride and the array are not aligned. This causes an exception when trying to convert to or from a bitmap. This pull request fixes this problem.

This pull request fixes issues #457 and #459.