rawloader
rawloader copied to clipboard
Shutter speed, ISO and aperture
Hi! Is there any hope that shutter speed, ISO and aperture will appear in RawImage struct? How difficult is it to implement?
Hey there. I've considered doing it in the past for the formats I most care about. Other projects don't bundle this functionality because it's a whole other can of worms compared to raw decoding, but there's a lot in common. A lot of the parsing is the same and saner formats will have that information accessible very easily as EXIF uses the TIFF structure for most of its work and there's already a parser for that.
So I'd definitely take a PR that adds an Option<EXIFInfo> or something like that to RawImage and adds support for at least one format. Depending on what format you care about most that may even be an easy thing to do based on the existing parser.
Look at https://github.com/pedrocr/rawloader/pull/37#issue-1174991177
What's the intended scope? Expose an EXIF blob or actually parse the EXIF data?
NativeExitItem store raw EXIF blob copied from TiffEntry. Blob is parsed only if you call getters (ExifInfo::get_uint, ExifInfo::get_rational etc). This is more safe if you don't want use EXIF data because it just copies bytes and can't fail if something goes wrong
By the way, how to test this library? Is there a set of RAW files to check if I broke something?
@art-den Yeah I don't think there's much in the way of testing, and given how large RAW files are I'm not sure that a test suite belongs in this repo. However, copyright-free samples from a variety of cameras are available here:
http://www.rawsamples.ch/index.php/en/
This piqued my interest as I'd like to expose the metadata and thumbnails in a NEF file. To that end I've started work on a quick NEF parser and would be happy to contribute whatever to ensure that metadata also works with Nikon files.
To test rawloader I use the raw library from here:
https://raw.pixls.us/
I have some personal scripts I use to do some checks, but I've been meaning to add to this repo a way to run quick regression testing across the whole library:
- A simple binary that writes a text output of the rawloader decoding result for a file. Basically all the metadata and some hash of the file contents.
- A script that downloads all the files from the archive if you don't have them yet, runs the binary on each, and compares the output to a stored output in the repo
Once the initial download is done, running the test becomes fast.
I have added exif support to almost all formats. I want to test it before submitting a pull request