19 #ifndef PAGESPEED_KERNEL_IMAGE_SCANLINE_UTILS_H_
20 #define PAGESPEED_KERNEL_IMAGE_SCANLINE_UTILS_H_
27 namespace net_instaweb {
33 namespace image_compression {
43 size_t GetNumChannelsFromPixelFormat(PixelFormat format,
44 MessageHandler* handler);
62 : data_(NULL), length_(0), offset_(0),
63 message_handler_(handler) {
72 void Initialize(
const void* image_buffer,
size_t buffer_length) {
73 data_ =
static_cast<const char*
>(image_buffer);
74 length_ = buffer_length;
79 data_ =
static_cast<const char*
>(image_string.data());
80 length_ = image_string.length();
93 void set_offset(
size_t val) {
97 return message_handler_;
114 bool ExpandPixelFormat(
size_t num_pixels, PixelFormat src_format,
115 int src_offset,
const uint8_t* src_data,
116 PixelFormat dst_format,
int dst_offset,
Definition: scanline_utils.h:59
Definition: scanline_utils.h:48
std::string GoogleString
PAGESPEED_KERNEL_BASE_STRING_H_.
Definition: string.h:24
Definition: message_handler.h:39