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).
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. 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 _______________________________________________ Magick-users mailing list [email protected] http://studio.imagemagick.org/mailman/listinfo/magick-users
