Adding caption to jpeg without decoding / recoding

Questions and postings pertaining to the development of ImageMagick, feature enhancements, and ImageMagick internals. ImageMagick source code and algorithms are discussed here. Usage questions which are too arcane for the normal user list should also be posted here.
Post Reply
cslewis2013
Posts: 1
Joined: 2013-09-16T19:12:36-07:00
Authentication code: 6789

Adding caption to jpeg without decoding / recoding

Post by cslewis2013 »

I want to be able to add a caption to a jpeg image. ImageMagick already supports this of course with its excellent annotate commands, but it requires that IM fully decompress the jpeg image first, and then recompress the image after the text is added. This is not a problem on a PC, but on small single board computers, the amount of cpu / memory / amount of time this takes to do is unacceptable.

I want to be able to generate a text blob of a certain height and width, and then concatenate this new blog with an existing jpeg image without having decompress the image first. Generating a text jpeg that is wide but not very tall is fast. Is there a way to combine two jpegs together without having to decode the two jpeg files?
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Adding caption to jpeg without decoding / recoding

Post by fmw42 »

As far as I know, IM will always decompress and recompress when processing jpg files. You probably need some other non-IM tool.

see
http://www.imagemagick.org/Usage/formats/#jpg_non-im

But I do not know if any of them will do what you want.
Post Reply