I was given some PhaseOne iXM-100 .IIQ
photos and I need to convert them into .jpg
format. The iXM-100 was used with a DJI drone, though I am unsure if it was the M300 or M600. Due to have thousands of them, I'd like the conversion to happen programmatically (Python). I've tried a couple different methods, but both have failed.
First Code Block; works, but the output image is static. Seems that when I change the image mode, it changes the static color. Some modes work and some do not.
from PIL import Image
rawData = open("D:/Downloads/P0036906.IIQ", 'rb').read()
imgSize = (640,480)
img = Image.frombytes('RGB', imgSize, rawData)
img.save("D:/Downloads/P0036906.jpg")
Second Code Block; errors out. Seems that the library cannot read an .iiq
format
import rawpy
import imageio
path = "D:/Downloads/P0036906.IIQ"
with rawpy.imread(path) as raw:
rgb = raw.postprocess()
imageio.imwrite('D:/Downloads/P0036906.jpg', rgb)
Traceback (most recent call last):
File "iqq_jpg.py", line 23, in <module>
rgb = raw.postprocess()
File "rawpy\_rawpy.pyx", line 887, in rawpy._rawpy.RawPy.postprocess
File "rawpy\_rawpy.pyx", line 790, in rawpy._rawpy.RawPy.dcraw_process
File "rawpy\_rawpy.pyx", line 438, in rawpy._rawpy.RawPy.ensure_unpack
File "rawpy\_rawpy.pyx", line 432, in rawpy._rawpy.RawPy.unpack
File "rawpy\_rawpy.pyx", line 936, in rawpy._rawpy.RawPy.handle_error
rawpy._rawpy.LibRawIOError: b'Input/output error'
Any suggestions on how to convert IIQ to JPG?