Add new comment

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 .