A tool to construct HDR-images from a series of exposures.

image.h 830B

1234567891011121314151617181920212223242526272829303132333435
  1. #ifndef IMAGE_AF9FV02C
  2. #define IMAGE_AF9FV02C
  3. #include <vector>
  4. #include <string>
  5. namespace haader {
  6. class Image {
  7. friend class HdrImageStack;
  8. public:
  9. Image();
  10. void to_string(std::string &s);
  11. bool read_from_file(const char *file_path);
  12. bool read_from_jpeg_file(const char *file_path);
  13. bool save_as_ppm_file(const char *file_path, bool ascii=false);
  14. unsigned int get_width();
  15. unsigned int get_height();
  16. unsigned int get_components();
  17. bool has_equal_dimensions(const Image &other);
  18. private:
  19. std::vector<unsigned char> m_image_data;
  20. unsigned int m_width;
  21. unsigned int m_height;
  22. unsigned int m_components;
  23. };
  24. }
  25. #endif // IMAGE_AF9FV02C