For Programmers: Free Programming Magazines  


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
Ashok

2005-06-08, 3:56 pm

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.


Tony

2005-06-08, 3:56 pm

"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


Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com