How to save numpy array as .raw image?

Viewed 2225

I have some array, let's say a = np.asarray([[10, 50], [30, 60]])
And I know that colors of pixels are colors = np.asarray([['G', 'R'], ['B', 'G']])
I want to save the image in .raw (or .dng) format. How do I do this?

1 Answers

I think the rawpy library might be your friend here, I believe the raw_image type is just implemented through numpy arrays.

Related