Page 1 of 1

composite with multipage tiff

Posted: 2008-02-21T02:50:42-07:00
by jmunin
Hello,

I try:

composite -gravity NorthEast -geometry +150+150 -compose multiply overlay.bmp background.tif result.tif

or

convert background.tif overlay.bmp -gravity NorthEast -geometry +150+150 -compose multiply -composite result.tif

and if background.tif is a simple page tiff, the result is fine.

But if i work with multipage tiff and composite (first example), result.tif only has overlayed the first page of the original multipage tiff (result.tif only have one page). I supposed that result should have all pages overlayed with overlay.bmp.

But if i work with multipage tiff and convert (second example), result.tif only has the first page of the original multipage tiff overlayed with the second page of the original multipage tiff (instead of overlay.bmp). Result.tif only have one page too.

i know multipage.tif[0] technique, but i don't know how to apply in this case.

I needed apply overlay.bmp over the tiff first page, but the final file (result.tif) should have all pages (overlayed first page included).

Best regards

Re: composite with multipage tiff

Posted: 2008-02-21T11:28:26-07:00
by fmw42
Try:

convert \( background.tif -coalesce \) null: overlay.bmp -gravity NorthEast -geometry +150+150 -compose multiply -layers composite result.tif


see:

http://www.imagemagick.org/script/comma ... hp?#layers
http://www.imagemagick.org/Usage/anim_mods/#composite

Re: composite with multipage tiff

Posted: 2008-02-22T07:06:36-07:00
by jmunin
Hello fmw42,

Thank you very much for your reply. It has been a great help for me.

I added finally:
convert \( multi.tif -coalesce \) null: stamp.gif -gravity NorthEast -geometry +150+150 -compose multiply -layers composite -depth 8 -type grayscale -compress group4 result.tif

because i get a error to open result.tif otherwise.

However, the previous example overlayed all multi.tif pages with stamp.gif.
it's this possible with only first page (but result.tif has all pages)?

Best regards

Re: composite with multipage tiff

Posted: 2008-02-24T01:36:04-07:00
by fmw42
I am no expert and have no way to test these, but to only overlay the first frame only, try something like the following,

convert \( multi.tif[0] stamp.gif -gravity NorthEast -geometry +150+150 -compose multiply -composite \) multi.tif -delete 1 -compress group4 tmp.gif

or

convert \( animation_text.gif[0] question.gif -gravity Center -compose multiply -composite \) \( animation_text.gif -delete 0 \) -compress group4 tmp.gif

Re: composite with multipage tiff

Posted: 2008-02-25T05:44:08-07:00
by jmunin
hello,

You example works fine, but i added:

convert ( multi.tif[0] stamp.gif -gravity NorthEast -geometry +150+150 -compose multiply -composite ) multi.tif -monochrome -define quantum:polarity=min-is-white -delete 1 result.tif

because if not it fail with the problem that comment in this post:

viewtopic.php?f=2&t=8509&hilit=minisblack

so thanks again... you're my idol! ;-)

Best regards