"Michael Slate" on wrote... | Okay, I've been beating my head against the wall all night and think that I | finally have somewhat of a workable solution, but I know its not optimal. | So, I was hoping that I could get some help from the experts. | As you all probably know, my task it to take a picture and frame it with an | actual picture frame, which Is currently working using Fred's method | (Anthony, I haven't had time to get your frame pieces one up and running but | I'm sure I'll get there). | The examples for edge framing are now all online and complete showing various methods and edge image tiling techniques. http://imagemagick.org/Usage/thumbnails/#frame_edge
The technique only relies on two shaded edge images (or one unshaded). It does not need pre-generated corner pieces which means there is no miss-matching of the corners to the tiling edges, such as the exampled ornate gold frame, or the bamboo frame used for demonstrations. It also talks about randomization of the length offset for such tialable frames. You may also like to look at the new section on border overlays. http://imagemagick.org/Usage/thumbnails/#border_overlay If you images do not change size, then using a pre-prepared overlay like this wil be much faster and more versitile than frame edging. You can of course use the frame edging to prepare the overlay images, complete with your tiled 'border' images. | To add to this complexity, sometimes users will need to add 1 or 2 Mats of | varying widths. I thought this was solved with the -border and -bordercolor | operators, but unfortunately it seems the mats we are using are not just | solid colors and have a bit of texture to them. Plus, I can never quite get | the hexidecimal close enough to the actual mat color that we received via | color swatch. | | Basically I need to tile a color swatch: | | http://beta.posters2prints.com/test2.gif | | behind a picture: | | http://beta.posters2prints.com/FW324.jpg | | around an image. I have come up with a way to do it, but I'm not sure | whether its optimal, or if there is a way to work it into my framing | command. Here are the basic commands: | | convert -size 270x386 tile:test2.gif tile_size.gif | | composite -gravity center FW324.jpg -compose Over \( tile_size.gif \) | test1.gif | | The result: | | http://beta.posters2prints.com/test1.gif | | Is actually pretty much what I'm looking for. My methodology above creates a | bigger image than the picture and tiles the swatch over that. Then I place | the original image over the bigger, tiled swatch picture. | You have prety well summed up what needs to be done. Of course the size of the image in tiled background is what needs to be used in the framing section of the final script you write. ASIDE: another way to do a tiled border is the same as the methdo used for edge framing, just with a single edge. convert image.jpg -border 50x50 \ -tile border_tile_image -draw 'color 0,0 floodfill' \ ... rest of the framing... This adds a solid color border (a light grey by default) then tiles over it using the tile image you want. the major difference is you specify the size of the border, rather than the final size of the bordered image. | Now, what I'd really like to do is make it faster and combine it with my | crazy framing command (obviously this contains my old way of matting, and is | Fred's method of framing): | (this uses a different image than above, hence the different dimensions) | | convert \( -size 445x512 xc:white \) \( /tmp/brcorner41755381685frame.png | -rotate 180 \) -gravity NorthWest -composite \( | /tmp/brcorner41755381685frame.png[1x52+0+0] -filter point -resize 337x52! | -flip \) -gravity North -composite \( /tmp/brcorner41755381685frame.png | -flip \) -gravity NorthEast -composite \( | /tmp/brcorner41755381685frame.png[54x1+0+0] -filter point -resize 54x408! | -flop \) -gravity West -composite \( | /tmp/GOR-1171755381685main.jpg -bordercolor white -border 2x2+0+1 | -bordercolor '#ffffff' -border 36x36 \) | -gravity Center -composite \( /tmp/brcorner41755381685frame.png[54x1+0+0] | -filter point -resize 54x408! \) -gravity East -composite \( | /tmp/brcorner41755381685frame.png -flop \) -gravity SouthWest -composite \( | /tmp/brcorner41755381685frame.png[1x52+0+0] -filter point -resize 337x52! \) | -gravity South -composite \( /tmp/brcorner41755381685frame.png \) -gravity | SouthEast -composite /tmp/GOR-1171755381685main.jpg | Anthony Thyssen ( System Programmer ) <[EMAIL PROTECTED]> ----------------------------------------------------------------------------- Nice DM! Good DM! Please put down the ``Outerplanes Monster Manual'' ----------------------------------------------------------------------------- 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
