This is a discussion on How do I hide part of an image with white space? within the PHP Language forums, part of the PHP Programming Forums category; Hi, I'm using PHP 5. I was wondering given an image, a.jpg, how can I make an image ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Hi,
I'm using PHP 5. I was wondering given an image, a.jpg, how can I make an image that would look like you slid a white index card (which I have a file, white.jpg with the same dimensions as a.jpg) over a.jpg? Note that you'd be sliding the image from top to bottom or from left to right, but not both. Thanks, let me know if this makes sense ... it's a litlte hard to describe. Best, - Dave |
|
|||
|
laredotornado@zipmail.com schrieb:
> Hi, > > I'm using PHP 5. I was wondering given an image, a.jpg, how can I > make an image that would look like you slid a white index card (which > I have a file, white.jpg with the same dimensions as a.jpg) over > a.jpg? Note that you'd be sliding the image from top to bottom or > from left to right, but not both. > > Thanks, let me know if this makes sense ... it's a litlte hard to > describe. > > Best, - Dave You are looking for: a) z-index (HTML) or b) gd2 Functions (PHP) |
|
|||
|
Olaf Schinkel wrote:
> laredotornado@zipmail.com schrieb: >> Hi, >> >> I'm using PHP 5. I was wondering given an image, a.jpg, how can I >> make an image that would look like you slid a white index card (which >> I have a file, white.jpg with the same dimensions as a.jpg) over >> a.jpg? Note that you'd be sliding the image from top to bottom or >> from left to right, but not both. >> >> Thanks, let me know if this makes sense ... it's a litlte hard to >> describe. >> >> Best, - Dave > You are looking for: > a) z-index (HTML) > or > b) gd2 Functions (PHP) Or even 'transparent gif movies'. And Z-index |
|
|||
|
On Jun 13, 3:49*pm, Olaf Schinkel <tr...@schinkel.tv> wrote:
> laredotorn...@zipmail.com schrieb:> Hi, > > > I'm using PHP 5. *I was wondering given an image, a.jpg, how can I > > make an image that would look like you slid a white index card (which > > I have a file, white.jpg with the same dimensions as a.jpg) over > > a.jpg? *Note that you'd be sliding the image from top to bottom or > > from left to right, but not both. > > > Thanks, let me know if this makes sense ... it's a litlte hard to > > describe. > > > Best, - Dave > > You are looking for: > a) z-index (HTML) > or > b) gd2 Functions (PHP) Let's say I go the gd2 route. What functions/concepts would I use? Do you have any example code? Thanks, - Dave |
|
|||
|
laredotornado@zipmail.com wrote:
> On Jun 13, 3:49 pm, Olaf Schinkel <tr...@schinkel.tv> wrote: >> laredotorn...@zipmail.com schrieb:> Hi, >> >>> I'm using PHP 5. I was wondering given an image, a.jpg, how can I >>> make an image that would look like you slid a white index card (which >>> I have a file, white.jpg with the same dimensions as a.jpg) over >>> a.jpg? Note that you'd be sliding the image from top to bottom or >>> from left to right, but not both. >>> Thanks, let me know if this makes sense ... it's a litlte hard to >>> describe. >>> Best, - Dave >> You are looking for: >> a) z-index (HTML) >> or >> b) gd2 Functions (PHP) > > Let's say I go the gd2 route. What functions/concepts would I use? > Do you have any example code? > > Thanks, - Dave > Try RTFM at php.net. It contains a lot of good information. -- ================== Remove the "x" from my email address Jerry Stuckle JDS Computer Training Corp. jstucklex@attglobal.net ================== |
|
|||
|
laredotornado@zipmail.com schrieb:
> On Jun 13, 3:49 pm, Olaf Schinkel <tr...@schinkel.tv> wrote: >> laredotorn...@zipmail.com schrieb:> Hi, >> >>> I'm using PHP 5. I was wondering given an image, a.jpg, how can I >>> make an image that would look like you slid a white index card (which >>> I have a file, white.jpg with the same dimensions as a.jpg) over >>> a.jpg? Note that you'd be sliding the image from top to bottom or >>> from left to right, but not both. >>> Thanks, let me know if this makes sense ... it's a litlte hard to >>> describe. >>> Best, - Dave >> You are looking for: >> a) z-index (HTML) >> or >> b) gd2 Functions (PHP) > > Let's say I go the gd2 route. What functions/concepts would I use? > Do you have any example code? > > Thanks, - Dave The question is: **WHAT** do you want to do? Do you want to hide the picture at start and than show more an more? If yes, Javascript is your friend (with the 2. picture with z-index). If not, describe what the user will see. |
|
|||
|
Olaf Schinkel wrote:
> laredotornado@zipmail.com schrieb: >> On Jun 13, 3:49 pm, Olaf Schinkel <tr...@schinkel.tv> wrote: >>> laredotorn...@zipmail.com schrieb:> Hi, >>> >>>> I'm using PHP 5. I was wondering given an image, a.jpg, how can I >>>> make an image that would look like you slid a white index card (which >>>> I have a file, white.jpg with the same dimensions as a.jpg) over >>>> a.jpg? Note that you'd be sliding the image from top to bottom or >>>> from left to right, but not both. >>>> Thanks, let me know if this makes sense ... it's a litlte hard to >>>> describe. >>>> Best, - Dave >>> You are looking for: >>> a) z-index (HTML) >>> or >>> b) gd2 Functions (PHP) >> >> Let's say I go the gd2 route. What functions/concepts would I use? >> Do you have any example code? >> >> Thanks, - Dave > The question is: > **WHAT** do you want to do? > Do you want to hide the picture at start and than show more an more? > If yes, Javascript is your friend (with the 2. picture with z-index). > If not, describe what the user will see. One trick that can work, and doesn't use the Z index at all, is to set a background image centered in a table cell, and then put a transparent gif animation over the top of that. |
|
|||
|
The Natural Philosopher wrote:
> Olaf Schinkel wrote: >> laredotornado@zipmail.com schrieb: >>> On Jun 13, 3:49 pm, Olaf Schinkel <tr...@schinkel.tv> wrote: >>>> laredotorn...@zipmail.com schrieb:> Hi, >>>> >>>>> I'm using PHP 5. I was wondering given an image, a.jpg, how can I >>>>> make an image that would look like you slid a white index card (which >>>>> I have a file, white.jpg with the same dimensions as a.jpg) over >>>>> a.jpg? Note that you'd be sliding the image from top to bottom or >>>>> from left to right, but not both. >>>>> Thanks, let me know if this makes sense ... it's a litlte hard to >>>>> describe. >>>>> Best, - Dave >>>> You are looking for: >>>> a) z-index (HTML) >>>> or >>>> b) gd2 Functions (PHP) >>> >>> Let's say I go the gd2 route. What functions/concepts would I use? >>> Do you have any example code? >>> >>> Thanks, - Dave >> The question is: >> **WHAT** do you want to do? >> Do you want to hide the picture at start and than show more an more? >> If yes, Javascript is your friend (with the 2. picture with z-index). >> If not, describe what the user will see. > > One trick that can work, and doesn't use the Z index at all, is to set a > background image centered in a table cell, and then put a transparent > gif animation over the top of that. Which has absolutely nothing to do with the op's question. -- ================== Remove the "x" from my email address Jerry Stuckle JDS Computer Training Corp. jstucklex@attglobal.net ================== |
|
|||
|
Olaf Schinkel wrote:
> laredotornado@zipmail.com schrieb: >> On Jun 13, 3:49 pm, Olaf Schinkel <tr...@schinkel.tv> wrote: >>> laredotorn...@zipmail.com schrieb:> Hi, >>> >>>> I'm using PHP 5. I was wondering given an image, a.jpg, how can I >>>> make an image that would look like you slid a white index card (which >>>> I have a file, white.jpg with the same dimensions as a.jpg) over >>>> a.jpg? Note that you'd be sliding the image from top to bottom or >>>> from left to right, but not both. >>>> Thanks, let me know if this makes sense ... it's a litlte hard to >>>> describe. >>>> Best, - Dave >>> You are looking for: >>> a) z-index (HTML) >>> or >>> b) gd2 Functions (PHP) >> >> Let's say I go the gd2 route. What functions/concepts would I use? >> Do you have any example code? >> >> Thanks, - Dave > The question is: > **WHAT** do you want to do? > Do you want to hide the picture at start and than show more an more? > If yes, Javascript is your friend (with the 2. picture with z-index). > If not, describe what the user will see. And when js is disabled? -- ================== Remove the "x" from my email address Jerry Stuckle JDS Computer Training Corp. jstucklex@attglobal.net ================== |
|
|||
|
laredotornado@zipmail.com wrote:
> Hi, > > I'm using PHP 5. I was wondering given an image, a.jpg, how can I > make an image that would look like you slid a white index card (which > I have a file, white.jpg with the same dimensions as a.jpg) over > a.jpg? Note that you'd be sliding the image from top to bottom or > from left to right, but not both. > > Thanks, let me know if this makes sense ... it's a litlte hard to > describe. > > Best, - Dave I've thought more about this. Sure, you can do it in PHP - look up the gd functions in the manual. But if this is to be dynamic, I think flash would be better. -- ================== Remove the "x" from my email address Jerry Stuckle JDS Computer Training Corp. jstucklex@attglobal.net ================== |