struct.error: unpack requires a buffer of 4380480 bytes (RAW to DNG) using Python

112 Views Asked by At

I need to convert a RAW file to DNG using Python and I keep getting a struct.error...

This error is uncommon as far I can see on the internet — I am processing RAW image frames — and my error is "struct.error: unpack requires a buffer of 4380480 bytes" Here is the link to the google drive of the files I am using https://drive.google.com/file/d/1pwRS8FGXKjx4S5FRdQDf8A885QFqirja/view?usp=sharing

I am need to concat this header hd0.32k and to each raw file to produce a DNG file using this library (below) and everything is working fine except I hit this error and there is not a lot I could find on what to do. Should I use a different library? Is this possibly a corruption of raw file issue? All help will be appreciated! :)

DNG library https://github.com/schoolpost/PiDNG/tree/master/pidng

0

There are 0 best solutions below