DPReview.com is closing April 10th - Find out more

Answered: How to convert compressed Fuji RAW files to uncompressed?

Started Mar 7, 2021 | Discussions thread
sluggy_warrior Veteran Member • Posts: 3,204
Re: Answered: How to convert compressed Fuji RAW files to uncompressed?

eric333 wrote:

Greybeard2017 wrote:

eric333 wrote:

but... is there a way to decompress a compressed.raf file into an uncompressed .raf file?

Not a .dng, just an unzipped form if itself.

I have to believe a compressed .raf uses some form of rar or zip algorithm. And as it’s lossless there must be a way to unzip it.

Presumably so - but its not the entire file that is compressed - just the CFA raw data within the file - that complicates things a bit

That makes sense. The camera writes out the header portion of the file then engages the compression on the cfa data since the compression method is (likely) tweaked to work only with the cfa data anyway.

And I’m thinking the compression can’t be too complicated because the camera has to do this all in real time.

If you're comfortable with coding, all the details are available in the rawspeed library:

https://github.com/darktable-org/rawspeed/blob/f383f62eda0d22f53ea1b09c42348d63b5c915ac/src/librawspeed/decoders/RafDecoder.cpp

https://github.com/darktable-org/rawspeed/blob/f383f62eda0d22f53ea1b09c42348d63b5c915ac/src/librawspeed/decompressors/FujiDecompressor.cpp

However, I think converting from compressed to uncompressed RAF is a wrong direction. If an application doesn't support compressed RAF, update the application, or switch to a different one. Why waste storage with double file size?

Post (hide subjects) Posted by
Keyboard shortcuts:
FForum PPrevious NNext WNext unread UUpvote SSubscribe RReply QQuote BBookmark MMy threads
Color scheme? Blue / Yellow