| 1234567891011121314151617181920212223242526272829303132333435 |
- #ifndef IMAGE_AF9FV02C
- #define IMAGE_AF9FV02C
-
- #include <vector>
- #include <string>
-
- namespace haader {
-
- class Image {
- friend class HdrImageStack;
-
- public:
- Image();
-
- void to_string(std::string &s);
-
- bool read_from_file(const char *file_path);
- bool read_from_jpeg_file(const char *file_path);
- bool save_as_ppm_file(const char *file_path, bool ascii=false);
-
- unsigned int get_width();
- unsigned int get_height();
- unsigned int get_components();
- bool has_equal_dimensions(const Image &other);
-
- private:
- std::vector<unsigned char> m_image_data;
- unsigned int m_width;
- unsigned int m_height;
- unsigned int m_components;
- };
-
- }
-
- #endif // IMAGE_AF9FV02C
|