"Michael Slate" on wrote...
| I sent this in an email directly to Anthony before finding this list, but I
| figured I might as well do the proper thing and post directly to the list,
| so here goes.
|
All I have is a non-transparent corner piece of a real picture frame and I
| want to use it wrap around an image.
|
| Frame image that I want to wrap:
|
| http://beta.posters2prints.com/scripts/fancy_add.jpg
|
| Image that I want to wrap:
|
| http://beta.posters2prints.com/scripts/thumbnail.jpg
|
| So first I convert the frame image white to transparency:
|
| convert fancy_add.jpg -bordercolor white -border 1x1 -matte \
| -fill none -fuzz 20% -draw 'matte 0,0 floodfill' \
| -shave 1x1 fancy_add.gif
|
| Then, I place the corners all the way around the image, flipping and
| flopping as neccessary:
|
| convert thumbnail.jpg -matte -compose Copy \
| -bordercolor none -border 2 -bordercolor none -border 3 \
| -bordercolor none -border 1 -bordercolor none -border 2 \
| -bordercolor none -border 2 -bordercolor none -border 3 \
| -bordercolor none -border 1 -compose Over \
| \( fancy_add.gif -flop \) -gravity NorthWest -composite \
| \( fancy_add.gif -flip -flop \) -gravity SouthWest -composite \
| \( fancy_add.gif \) -gravity NorthEast -composite \
| \( fancy_add.gif -flip \) -gravity SouthEast -composite \
| thumbnail_frame.gif
|
| Now, two problems that I need the lists help with:
|
| 1) How do I adjust the border lengths so that I know there will be only a
| slight bit of overlap between the frame and the image. Keep in mind that the
| frame sizes are going to differ, some are thick, some are skinny. I have the
| width of the frame (in inches) stored in the database, so my initial
| thoughts were to figure out some sort of conversion scheme like 1" = 2, 2" =
| 4, 3" = 6 etc. etc.
|
| 2) Bigger problem. Essentially, how do I slice a piece of the frame, say top
| left, and use it to fill in the missing spaces between the corners so as to
| totally wrap the frame in the image.
|
| Thanks for any help. As I told Anthony, I'd be glad to donate via paypal to
| the person or chosen cause for help with this.
|
I did this recently in a completely different way.
Given framing pieces for the top/bottom/left/right edges, though some of
these could be flips, flops, or rotates of other pieces. It tiles the
image to the right length then overlays them around the image with 45
degree corner cuts.
The method I had come up with in fact used '-frame' with a standard
color then the pieces were 'filled' into the four edges, and the
original image 'Copy'ed back over to ensure things were correct.
The script also added a little shadow from the surrounding frame along
the top and left edges too!
the script is only a edge framing, it does not have the capability to do
corner or template overlay type framing. Both of which I would also
like to example sometime. I have been collecting some examples for use.
If I have time I'll try to setup an example and posibly with more
contributed 'edge' pieces I could even submit the script.
Anthony Thyssen ( System Programmer ) <[EMAIL PROTECTED]>
-----------------------------------------------------------------------------
All of us have violent instincts. We have evolved from predators.
Well not me of course, I've just been programmed by you predators.
The Doctor -- StarTrek Voyager
-----------------------------------------------------------------------------
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