proper way to handle maker notes

Rafael Espíndola rafael.espindola at gmail.com
Wed Jun 11 01:38:15 PDT 2008


> There is not really any standard way to access MakerNote. One of the
> reason is that some MakerNote may not even be an IFD. The other reason
> is that I didn't have any need for that yet, although it is planned as
> part of the meta data loading.
>
> Now about the code, a couple of comments:
>
> -Only use _locateExifIfd() if m_exifIfd is NULL
Nice. Will do that.

> -Don't assert on conditions that occur at run time. assert() are only
> for semantic checks, like passing NULL where it is forbidden, etc.
Sure. This is just the first version that worked. I had a hard coded
curve before :-)

> -Passing &temp[0] to something that expect a "raw" pointer is a
> fundamental error. There is absolutely NO warranty that
>  &temp[n + 1] == &temp[n] when temp is a std::vector<>.

you mean &temp[n+1] == &temp[n] + 1 right?

I think it is

http://www.velocityreviews.com/forums/t281876-is-stdvector-contiguous.html


> -There is a IFDEntry::getArray<>() to which you pass a vector that
> should do that for you.

I tried, but the IFD  used by NEF has base != start of the header
(note the "+ 10", so I couldn't get it to work.  Not a big issue,
since the final version has to read 16 bits. I  just used the uint8_t
vector to debug by comparing with "exiv2 -b -p h" output.

I should have a patch that reads most NEF files this weekend :-)

>
> Hub

Thank a lot,
Rafael


More information about the Libopenraw-dev mailing list