Copyright metadata

Sony A7III camera add a copyright notice into ARW metadata. How can I read it?
I don't find any structure member named "copyright".
Note: Copyright metadata is different from author metadata.


Copyright metadata

Thanks. I will try using EXIF callback. I come here again if I can't make it work.

Using C API: How you use datastream?

I have setup an exif parser callback. I correctly receive the copyright tag. I assume I have to read his value using passed ifp argument (The pointer to LibRaw_abstract_datastream input stream, positioned to start of data). But how can I do that using the C API?

Context: My program is written with Delphi which can use any C-API from DLL, but Delphi can't use C++ objects.

LibRaw C-API and datastream

That is not a question related to Delphi but related to LibRaw C-API.
The question is: Using LibRaw C-API, how to call the datastream reader to read an EXIF tag value from the exif parser callback.

Probably one will need to

Probably one will need to write some code (to install callback(s) and callback code itself)

-- Alex Tutubalin @LibRaw LLC

I wrote the code to install

I wrote the code to install the callback and the callback gets called when a RAW file is read. Now, from the callback, when the wanted tag is seen, how to I call the datastream read method to read the tag value. The call back receive a pointer to LibRaw_abstract_datastream input stream. The question is how the datastream read method is called from the callback code which is [equivalent to] C code and as such has to use LibRaw C-API. I don't see anything in LibRaw C-API to use a datastream.

Adding libraw_datastream_read to C-API

To solve the issue of reading EXIF copyright data using the C-API, I added a simple function in libraw_c_api.c:

  DllDef int libraw_datastream_read(void *ifp, void *ptr, size_t size, size_t nmemb)
    if (!ifp)
      return -1;
    return ((LibRaw_abstract_datastream *)ifp)->read(ptr, size, nmemb);

Then from my application I can call that function from the exifparser callback installed using libraw_set_exifparser_handler.

Simple and easy.
Of course other similar functions may be added to call various LibRaw_abstract_datastream methods .