rawloader icon indicating copy to clipboard operation
rawloader copied to clipboard

Shutter speed, ISO and aperture

Open art-den opened this issue 3 years ago • 10 comments

Hi! Is there any hope that shutter speed, ISO and aperture will appear in RawImage struct? How difficult is it to implement?

art-den avatar Feb 08 '22 21:02 art-den

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.

pedrocr avatar Feb 21 '22 21:02 pedrocr

Look at https://github.com/pedrocr/rawloader/pull/37#issue-1174991177

art-den avatar Mar 21 '22 07:03 art-den

What's the intended scope? Expose an EXIF blob or actually parse the EXIF data?

inferiorhumanorgans avatar Mar 21 '22 09:03 inferiorhumanorgans

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

art-den avatar Mar 21 '22 09:03 art-den

By the way, how to test this library? Is there a set of RAW files to check if I broke something?

art-den avatar Mar 21 '22 10:03 art-den

@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.

inferiorhumanorgans avatar Mar 23 '22 01:03 inferiorhumanorgans

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:

  1. 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.
  2. 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.

pedrocr avatar Apr 15 '22 23:04 pedrocr

I have added exif support to almost all formats. I want to test it before submitting a pull request

art-den avatar Apr 19 '22 13:04 art-den