I am new to using C++. I am trying to convert an image to a string (I need to convert an image to a buffer).
So I use the "opencv" library. I try it but it doesn't work. When I execute my program this way:
g++ testpng.cpp -o testpng
This is the error in the terminal:
/usr/local/include/opencv4/opencv2/opencv.hpp:48:10: fatal error: opencv2/opencv_modules.hpp: No such file or directory
48 | #include "opencv2/opencv_modules.hpp"
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
I need help to solve this error, or a working example to convert an image (.png) to a string, please!!