SciSharp/NumSharp

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

AmbachtIT opened this issue · 0 comments

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

  • An 475x554x3 bitmap.

Actual result

  • throws IncorrectShapeException: shape mismatch: objects cannot be broadcast to a single shape

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.