/* * Processing of images uploaded by the user * (resizing, cropping, saving) */ #ifndef IMG_HANDLER_HPP_SENTRY #define IMG_HANDLER_HPP_SENTRY #include enum { width = 300, height = 300 }; class ImageHandler { int channel; int in_width; int in_height; std::string source_path; std::string destination_directory; unsigned char *img_data; unsigned char *resized_data; public: ImageHandler(const char *p); void load_img(); void resize_img(); void save_img(); }; #endif