Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CR3 support #23

Open
pablosichert opened this issue Oct 1, 2019 · 8 comments
Open

CR3 support #23

pablosichert opened this issue Oct 1, 2019 · 8 comments

Comments

@pablosichert
Copy link

pablosichert commented Oct 1, 2019

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.

@valpackett
Copy link

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

@RReverser
Copy link

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

@pedrocr
Copy link
Owner

pedrocr commented Jul 2, 2023

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.

@RReverser
Copy link

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 dnglab/dnglab#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
Copy link

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/

@pedrocr
Copy link
Owner

pedrocr commented Jul 3, 2023

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.

@RReverser
Copy link

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
Copy link

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 :)

rawloader/LICENSE

Lines 493 to 502 in 56297da

You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the library, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the
library `Frob' (a library for tweaking knobs) written by James Random
Hacker.
{signature of Ty Coon}, 1 April 1990
Ty Coon, President of Vice

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants