rawloader icon indicating copy to clipboard operation
rawloader copied to clipboard

CR3 support

Open pablosichert opened this issue 4 years ago • 8 comments

First of all - awesome library, thanks for putting it out there!

I'm using rawloader to uniquely identify raw files, even when some of the attributes have been written to the file (e.g. an jpg preview has been updated). I do so by reading the raw image buffer and creating a sha256 hash out of it.

Works perfectly fine for my CR2 files, but it looks like CR3 is not supported yet.

You can find sample files on https://raw.pixls.us by searching for "EOS RP" or "EOS M50".

Let me know if there's anything I can do to assist you here!

Edit: A description of the file format can be found at https://github.com/lclevy/canon_cr3.

pablosichert avatar Oct 01 '19 23:10 pablosichert

Looks like https://github.com/dnglab/dnglab has a fork of rawloader inside that is focused on CR3.

valpackett avatar Aug 19 '21 22:08 valpackett

@pedrocr Are there plans to merge CR3 from the fork into mainstream?

RReverser avatar Jul 02 '23 00:07 RReverser

Didn't realize dnglab had an internal fork. I'm more than happy to collaborate. Adding metadata support was also in the plans but haven't worked on this lately.

pedrocr avatar Jul 02 '23 08:07 pedrocr

I'm more than happy to collaborate.

Hm I don't represent rawler, so you probably should reach out to each other for that somehow. I was rather thinking that you could merge upstream changes into rawloader yourself (& preserve licenses).

Meanwhile I opened an issue asking if they'd publish their fork to crates.io https://github.com/dnglab/dnglab/issues/318, but I don't have a strong preference, happy to use either crate as long as I can read CR3 & ideally metadata as well.

RReverser avatar Jul 02 '23 10:07 RReverser

A bit off-topic but meanwhile also found libopenraw, which seems to be actively developed and also has CR3 & metadata support, but it appears to be in much earlier stages and not pure Rust. https://libopenraw.freedesktop.org https://docs.rs/libopenraw/latest/libopenraw/

RReverser avatar Jul 02 '23 10:07 RReverser

I'm happy to merge PRs if there's something in particular you'd like added. Other than that I just have to find time to work on more stuff. Metadata is definitely on my radar.

Licenses shouldn't be much of a problem. All these tools should be LGPL2 as they all tend to come from the same original base code.

pedrocr avatar Jul 03 '23 17:07 pedrocr

Realised that for now I can just add

rawler = { git = "https://github.com/dnglab/dnglab" }

and Cargo actually finds crates in subdirectories too, so that's probably a bit quicker to unblock me so that I could play with that crate.

I'm happy to merge PRs if there's something in particular you'd like added.

Yeah for me it's specifically CR3 support (since that's the only format my camera supports). Having metadata is also nice - I do need to extract exposure time.

kamadak-exif tends to cover it for most formats, since most RAW formats are TIFF-based, but CR3 is MPEG4-based so a separate library would be needed to extract its information, and in this case it helps to have it built-in into the RAW library.

RReverser avatar Jul 04 '23 13:07 RReverser

All these tools should be LGPL2 as they all tend to come from the same original base code.

That's a good point. I also just noticed that it seems you & the fork forgot to update author information in the license from the default sample - probably best to change it :)

https://github.com/pedrocr/rawloader/blob/56297dad3c1bdae9c63876bde869e1df1c2f1c95/LICENSE#L493-L502

RReverser avatar Jul 04 '23 13:07 RReverser