Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Merging Tiff Files

by mscharrer (Hermit)
on Jun 30, 2009 at 09:01 UTC ( [id://775952]=note: print w/replies, xml ) Need Help??


in reply to Merging Tiff Files

Hi, You want to overlay the tiff files is it? The one is the background the other the foreground layer? Imagemagick is the right tool. There is also a command line program called 'convert' which can be used. You do not need a Perl script for this as long you do not need to do more than just the image manipulation. Google gives you the following link when you search for "image magick overlay". The command described there should do the trick.

http://www.randomsequence.com/articles/overlaying-images-with-imagemagick/

If you need to do it with Perl/Image::Magick than I'm sure that this package gives you all the options the command line tool gives you. Just check the manual how to do it exactly.

Best, Martin

Replies are listed 'Best First'.
Re^2: Merging Tiff Files
by Shinama (Acolyte) on Jul 01, 2009 at 08:51 UTC
    Hello Martin,

    thanks for the advice. I tried it but the effect is not exactly what I need: The sources are black/white tiffs. Because of the nature of blending one picture into another, both pictures black & white parts look kinda bad :(

    Someone told me that with the LeadTools (funny name <_<) it would be possible to do some kind of mathematic: you (apparently) can tell the tools: take both pictures, and if a pixel is black in one of the pictures, make the target pixel in the output file black too. That's similiar to blending but it should save the black/white parts of the tiff.

    Is something like that possible with Perl::Magick? I tried the XOR functions, the different combining functions etc but still I'm not able do to that.

    Perhaps it's not possible to do what I would need but if there is a chance please tell me. And even if I fail I learned something about manipulating images with perl so it wasn't for nothing :D

    Thanks for your help in advance,
    Shinama
    ---------------------------------------------------
    "You read too much and understand too little."
    Moiraine Damodred (The Wheel of Time)
      Hi,

      sorry I don't have a in-deep knowledge of image magick. I just use it from time to time and then I just check the online manual. But it should be possible with it.

      The XOR function is not what you need, more like an OR function. Just check the manual again and google for it.

      Martin

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://775952]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (9)
As of 2024-04-18 11:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found