diff options
author | scratko <m@scratko.xyz> | 2024-11-18 02:45:54 +0300 |
---|---|---|
committer | scratko <m@scratko.xyz> | 2024-11-18 15:32:49 +0300 |
commit | 7fea2267e78de935af6010d5ac7300e51f471601 (patch) | |
tree | 42a417b778c6f826b84bcc6515c292bd862dcd99 /img_handler.hpp | |
parent | 22d4fdabf17aebebfcb73c7d86b5bbc81b6530f4 (diff) | |
download | picture-puzzle-7fea2267e78de935af6010d5ac7300e51f471601.tar.gz picture-puzzle-7fea2267e78de935af6010d5ac7300e51f471601.tar.bz2 picture-puzzle-7fea2267e78de935af6010d5ac7300e51f471601.zip |
Uploading custom images
Diffstat (limited to 'img_handler.hpp')
-rw-r--r-- | img_handler.hpp | 26 |
1 files changed, 26 insertions, 0 deletions
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 <string> + +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 |