Home > Archive > PHP Language > June 2005 > laying 2 pics on each other
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
laying 2 pics on each other
|
|
|
| Hi,
I have a site where I have pictures and frames for the pictures.
Is it possible that user picks a picture (it opens in same or a new window)
and then picks a frame (which is added to the border of the picture
selected) to see how it looks. There will be different pictures and frames.
Any idea of how this can be achieved, if not in php, some other way?
Ashok.
| |
|
| "Ashok" <non2@mail.ru> wrote in message news:d86t33$1siq$1@gavrilo.mtu.ru...
> Hi,
> I have a site where I have pictures and frames for the pictures.
> Is it possible that user picks a picture (it opens in same or a new
> window)
> and then picks a frame (which is added to the border of the picture
> selected) to see how it looks. There will be different pictures and
> frames.
>
> Any idea of how this can be achieved, if not in php, some other way?
>
I think you would be better off looking into JavaScript and CSS to do that.
| |
| Kimmo Laine 2005-06-08, 8:56 pm |
| "Ashok" <non2@mail.ru> kirjoitti viestissä:d86t33$1siq$1@gavrilo.mtu.ru...
> Hi,
> I have a site where I have pictures and frames for the pictures.
> Is it possible that user picks a picture (it opens in same or a new
> window)
> and then picks a frame (which is added to the border of the picture
> selected) to see how it looks. There will be different pictures and
> frames.
>
> Any idea of how this can be achieved, if not in php, some other way?
In php you can insert a picture into another picture with image_resize. But
the simpler answer would be make a background-image of the frame to the
content-image that has padding of which width is the width of the
surrounding frame. That's how I would lay two images one over the other.
Say you have a image of the frame. Frame width is 20px and content is 100px.
So you make an image:
<img src="content.jpg" width=100 style="padding:20px;
background:url(frame.jpg);" />
That works only for previewing. But if you want to make a permanent image,
then you need to use image_resize()...
--
"I am pro death penalty. That way people learn
their lesson for the next time." -- Britney Spears
eternal.erectionN0@5P4Mgmail.com
|
|
|
|
|