Merge 2 (jpeg) images 

Newsgroups: comp.os.linux.misc
Date: 2001-10-06 09:12:46 PST
>is there a linux shell tool which is able to merge two (jpeg)images
>(for example to add watermarks to my images)?
combine (part of ImageMagick)


Merge 2 (jpeg) images 

combine is now named as composite (ImageMagick Version: 4:

ImageMagick Examples — Alpha Compositing
Best of the best!

Merge 2 (jpeg) images 

man Imagemagick
man combine
man convert

These programs have a lot of options, but at least some of them make sense. Also, you can use Gimp from the command line if you need to do anything more complicated than Imagemagick can handle. However, doing really complex things with Gimp from the command line apparently requires learning Scheme.

Matt G

Merge 2 (jpeg) images 

djpeg image.jpg > image.ppm
djpeg watermark.jpg > watermark.ppm
pnmarith -add image.ppm watermark.ppm | cjpeg > new.jpg

This assumes, of course, that you are doing a true "watermark,", that is a translucent design in the background of the image.

If you want a logo, you could do something like:

djpeg logo.jpg > logo.ppm
pnmpaste logo.ppm xoffset yoffset image.ppm | cjpeg > new.jpg

Mike Castle