libdng.h 768 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. #ifndef LIBDNG_LIBRARY_H
  2. #define LIBDNG_LIBRARY_H
  3. #include <limits.h>
  4. #include <time.h>
  5. #include <stdint.h>
  6. #define EXPORT __attribute__((__visibility__("default")))
  7. typedef struct {
  8. char *camera_make;
  9. char *camera_model;
  10. char *unique_camera_model;
  11. char *software;
  12. uint16_t orientation;
  13. struct tm datetime;
  14. // Raw image data
  15. uint16_t bayer_pattern_dimensions[2];
  16. float colormatrix1[9];
  17. float colormatrix2[9];
  18. float neutral[3];
  19. uint8_t cfapattern[4];
  20. } libdng_info;
  21. EXPORT int
  22. libdng_init();
  23. EXPORT void
  24. libdng_new(libdng_info *dng);
  25. EXPORT void
  26. libdng_free(libdng_info *dng);
  27. EXPORT int
  28. libdng_write(libdng_info *dng, const char *path, unsigned int width, unsigned int height, uint8_t *data,
  29. size_t length);
  30. #endif //LIBDNG_LIBRARY_H