| Message ID | 20260108092022.1190351-1-paul.elder@ideasonboard.com |
|---|---|
| State | New |
| Headers | show |
| Series |
|
| Related | show |
diff --git a/src/camshark/image.py b/src/camshark/image.py index 9f7e2408eb70..a167b98530bb 100644 --- a/src/camshark/image.py +++ b/src/camshark/image.py @@ -48,7 +48,7 @@ class Image: if self.bitspp == 8: data = data.reshape((height, width)) - data = data.astype(np.uint16) + data = data.astype(np.uint8) elif self.bitspp in [10, 12, 14, 16]: pixel_stride = stride // 2 data = data.view(np.uint16)
The image data in the Image class is reshaped to numpy arrays to ease processing. However, for 8-bit raws, this was converted to uint16 which is not correct. Fix this by changing the numpy array storage type to uint8 for 8-bit raw formats. Signed-off-by: Paul Elder <paul.elder@ideasonboard.com> --- src/camshark/image.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)