Anne Hartmann on wrote...
| Anne Hartmann <[EMAIL PROTECTED]> sent the following
| comment to "anthony", about "Question about IM montage".
| You are reading it:-
| ------------------------------------------------------------
| Hi,
|
| I've a question about using montage with "-texture". Is there a
| possibility to avoid the texture image to be repeated,
|
Only if the texture image is large enough so it does not need to repeat.
| if "-geometry" places the image on the background e.g. from middle
| down and 'enlarges' the output image? In my case cropping the output
| image to the given dimensions of the texture image would make a better
| result :-(
|
As the montage output is highly variable (and may even be multiple
images, though lets assume it is just one image), it is better to set
the background of the montage to transparent ('none'), then underlay a
image that you can then prepare to be the right size.
For example...
Feed the monatge output into a convert command, then underlay a
'granite' image centered in the montage area. and finally flatten it
onto a plain grey background for the rest of the montage area.
montage -label Rose rose: rose: rose: rose: \
-tile 2x2 -frame 5 -geometry +10+10 \
-background none png:- |\
convert png:- \
granite: -gravity center -compose DstOver -composite \
+compose -background grey -flatten output.jpg
Just look at the image produce at each point and see the steps being
used.
Montage with framing on a transparent background
Underlay (DstOver) a centered image unsing Composite
Flatten the result on a gray background.
Note that while -composite understands -gravity, -flatten does not and
probably never will. Flattens job is image layers which does not use
gravity.
Summary...
If you knew what the final size would have been -texture could have been
used by using a pre-processed image. Is it isn't know post-procees, when
the image size is known.
| Or is there a technique to achieve this in another way? I want to
| place an image onto a background image with size determining
| dimensions using geometry to define the correct position of the image
| to place...
|
Basically post process once montage has defined the size of the image.
| I hope this does'nt sound so weird / chaotic, and I hope you can help.
| Thanks in advance!!
|
See Also
Montage and Transparent Backgrounds
http://www.cit.gu.edu.au/~anthony/graphics/imagick6/montage/#bg
Image Positioning with Gravity
http://www.cit.gu.edu.au/~anthony/graphics/imagick6/annotating/#image_gravity
Flattening Images (last examples to add a background color)
http://www.cit.gu.edu.au/~anthony/graphics/imagick6/mosaics/#flatten
Cc'ing this to the IM mail list for others to also see and perhaps
respond.
Anthony Thyssen ( System Programmer ) <[EMAIL PROTECTED]>
-----------------------------------------------------------------------------
Always secure your files, you never know who is lurking about.
-- Rick Cook, "The Wizardry Compiled"
-----------------------------------------------------------------------------
Anthony's Home is his Castle http://www.cit.gu.edu.au/~anthony/
_______________________________________________
Magick-users mailing list
[email protected]
http://studio.imagemagick.org/mailman/listinfo/magick-users