6 #ifndef TURI_IMAGE_IMAGE_TYPE_HPP 7 #define TURI_IMAGE_IMAGE_TYPE_HPP 10 #include <core/storage/serialization/serialization_includes.hpp> 11 #include <boost/shared_ptr.hpp> 12 #include <boost/gil/typedefs.hpp> 14 const char IMAGE_TYPE_CURRENT_VERSION = 0;
45 size_t m_channels = 0;
47 size_t m_image_data_size = 0;
49 char m_version = IMAGE_TYPE_CURRENT_VERSION;
55 image_type(
const char* image_data,
size_t height,
size_t width,
56 size_t channels,
size_t image_data_size,
int version,
int format);
58 explicit image_type(
const boost::gil::rgb8_image_t& gil_image);
60 explicit image_type(
const boost::gil::rgba8_image_t& gil_image);
68 const unsigned char* get_image_data()
const;
70 bool operator==(
const image_type& other)
const;
The serialization input archive object which, provided with a reference to an istream, will read from the istream, providing deserialization capabilities.
boost::shared_ptr< char[]> m_image_data
The image data, stored in the format indicated by m_format in a char array.
bool is_decoded() const
Check whether image is decoded.
The serialization output archive object which, provided with a reference to an ostream, will write to the ostream, providing serialization capabilities.