Adding text to jpeg

How can you (in C / C ++) add text to a jpeg file using libjpeg?

I do not mean editing pixels, but adding text to metadata (for example, the libpng library png_set_text () for png files).

+3
source share
1 answer

Nothing found this:

char * text = "Hello world!";

jpeg_write_marker (& cinfo, JPEG_COM, (const JOCTET *) text, strlen (text));

(immediately after jpeg_start_compress)

+5
source

Source: https://habr.com/ru/post/1712343/


All Articles