Answer the question
In order to leave comments, you need to log in
How to add text to an image in C++?
Good afternoon. Such a task is worth it. There is a list of images, you need to pull out of them (one at a time) the date of creation of the image and place it on the image itself.
I have already found how to pull out the creation date of a file, but google cannot help me with adding this text to the image.
#include <sys/stat.h>
#include <unistd.h>
#include <time.h>
struct tm* clock; // create a time structure
struct stat attrib; // create a file attribute structure
stat("afile.txt", &attrib); // get the attributes of afile.txt
clock = gmtime(&(attrib.st_mtime)); // Get the last modified time and put it into the time structure
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question