SciSharp / NumSharp

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

NDArray.ToBitmap() does not handle images with odd width #459

Closed AmbachtIT closed 7 months ago

AmbachtIT commented 2 years ago

Reproduction

  1. Have an NDArray containing an image with an odd width. (1, 554, 475, 3)
  2. Convert it to a bitmap using NDArray.ToBitmap().

Expected result

Actual result

Related issue

This appears to be a bug related to Issue #457.

Fix

I have been able to reproduce the problem locally and will implement a fix. PR will be following shortly.