Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何(在 C/C++ 中)使用 libjpeg 将文本添加到 jpeg 文件?
我不是指编辑像素,而是向元数据中添加文本(如 png 文件的 png_set_text() libpng 库)。
没关系,找到了:
char *text = "你好,世界!";
jpeg_write_marker(&cinfo, JPEG_COM, (const JOCTET *)text, strlen(text));
(就在 jpeg_start_compress 之后)