From 7fea2267e78de935af6010d5ac7300e51f471601 Mon Sep 17 00:00:00 2001 From: scratko Date: Mon, 18 Nov 2024 02:45:54 +0300 Subject: Uploading custom images --- img_handler.hpp | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 img_handler.hpp (limited to 'img_handler.hpp') diff --git a/img_handler.hpp b/img_handler.hpp new file mode 100644 index 0000000..8c5754a --- /dev/null +++ b/img_handler.hpp @@ -0,0 +1,26 @@ +#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 path_to_file; + std::string path_to_save; + unsigned char *img_data; + unsigned char *resized_data; +public: + ImageHandler(const char *p); + void load_img(); + void resize_img(); + void save_img(); +}; + +#endif -- cgit v1.2.3