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 Answer
I think the rawpy library might be your friend here, I believe the raw_image type is just implemented through numpy arrays.
ais 2x2 picture, and each number corresponds to how much color of corresponding colors ofcolorsis presented in the corresponding pixel[['G', 'R'], ['B', 'G']]