Let assume my input image name is cat.jpg
after I processed the image I want to save the output image as cat_enhanced.jpg
. How do I can do like that?
I don't know how to access the image name and format separately.
char* inputImgName = argv[1];
This code store both image name and format in the inputImgName
pointer.
[Edited]
std::string imgNameString = argv[1];
Using this I can get the cat.jpg
, but don't know how to save the image as described above.
Expected output:
input image name: cat.jpg
output image name: cat_enhanced.jpg