Looking for a code or OS library to read RAW 12 using Java / C# / Python and to save in some common used format - JPG, GIF, PNG. Trying a following code:
import numpy
from PIL import Image
import rawpy
input_file = 'c:\IdeaProjects\raw12\IT8-chart-15ms.raw12'
npimg = numpy.fromfile(input_file, dtype=numpy.uint16)
imageSize = (2048, 1536)
npimg = npimg.reshape(imageSize)
Exception has occurred: ValueError
cannot reshape array of size 9437184 into shape (2048,1536)
output_file = 'converted.tiff'
Image.fromarray(npimg/1023.0).save(output_file)
Image RAW12 source
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…