By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
448,691 Members | 1,123 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 448,691 IT Pros & Developers. It's quick & easy.

How do I hide part of an image with white space?

P: n/a
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
Jun 27 '08 #1
Share this Question
Share on Google+
12 Replies


P: n/a
la***********@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)
Jun 27 '08 #2

P: n/a
Olaf Schinkel wrote:
la***********@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
Jun 27 '08 #3

P: n/a
On Jun 13, 3:49*pm, Olaf Schinkel <tr...@schinkel.tvwrote:
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
Jun 27 '08 #4

P: n/a
la***********@zipmail.com wrote:
On Jun 13, 3:49 pm, Olaf Schinkel <tr...@schinkel.tvwrote:
>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.
js*******@attglobal.net
==================

Jun 27 '08 #5

P: n/a
la***********@zipmail.com schrieb:
On Jun 13, 3:49 pm, Olaf Schinkel <tr...@schinkel.tvwrote:
>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.
Jun 27 '08 #6

P: n/a
Olaf Schinkel wrote:
la***********@zipmail.com schrieb:
>On Jun 13, 3:49 pm, Olaf Schinkel <tr...@schinkel.tvwrote:
>>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.
Jun 27 '08 #7

P: n/a
The Natural Philosopher wrote:
Olaf Schinkel wrote:
>la***********@zipmail.com schrieb:
>>On Jun 13, 3:49 pm, Olaf Schinkel <tr...@schinkel.tvwrote:
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.
js*******@attglobal.net
==================
Jun 27 '08 #8

P: n/a
Olaf Schinkel wrote:
la***********@zipmail.com schrieb:
>On Jun 13, 3:49 pm, Olaf Schinkel <tr...@schinkel.tvwrote:
>>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.
js*******@attglobal.net
==================
Jun 27 '08 #9

P: n/a
la***********@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.
js*******@attglobal.net
==================
Jun 27 '08 #10

P: n/a
On Jun 15, 6:12*am, Olaf Schinkel <tr...@schinkel.tvwrote:
laredotorn...@zipmail.com schrieb:
On Jun 13, 3:49 pm, Olaf Schinkel <tr...@schinkel.tvwrote:
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.- Hide quoted text -

- Show quoted text -
Here's what I'm trying to do. We can preview a document and see what
will be on the left side or the right side ...

http://screencast.com/t/bbgzlh4aG

but we may want to trim parts (either 1/8, 1/16, 1/2, user adjusts
amount) of the pages. Below is my crude Microsoft Paint mock-up of
trimming part of the right side:

http://screencast.com/t/HkPl9kyaBCK

This could happen on both sides of the page

http://screencast.com/t/KfCRngLe

So I'd like to use some image manipulation function to generate a new
image so that when I load my image, I can call the URL of the PHP
manipulation page. So folks have suggested "gd", but what shoudl I be
searching for within that? Again, any hints you can provide are
greatly appreciated, - Dave

Jun 27 '08 #11

P: n/a
la***********@zipmail.com wrote:
On Jun 15, 6:12 am, Olaf Schinkel <tr...@schinkel.tvwrote:
>laredotorn...@zipmail.com schrieb:
>>On Jun 13, 3:49 pm, Olaf Schinkel <tr...@schinkel.tvwrote:
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.- Hide quoted text -

- Show quoted text -

Here's what I'm trying to do. We can preview a document and see what
will be on the left side or the right side ...

http://screencast.com/t/bbgzlh4aG

but we may want to trim parts (either 1/8, 1/16, 1/2, user adjusts
amount) of the pages. Below is my crude Microsoft Paint mock-up of
trimming part of the right side:

http://screencast.com/t/HkPl9kyaBCK

This could happen on both sides of the page

http://screencast.com/t/KfCRngLe

So I'd like to use some image manipulation function to generate a new
image so that when I load my image, I can call the URL of the PHP
manipulation page. So folks have suggested "gd", but what shoudl I be
searching for within that? Again, any hints you can provide are
greatly appreciated, - Dave
Just the image or the entire page? If it's the entire page, then how
are you going to handle the text? Or are you going to do the worst and
try to put everything (including the text) in an image and display that
(which will be huge).

For the images, the gd functions will help. Try looking them up at
http://www.php.net/manual/en/. You'll need to understand the functions
to use them properly. Then come back here with the code you're trying
to get to work and we can help you.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================
Jun 27 '08 #12

P: n/a
la***********@zipmail.com schrieb:
On Jun 15, 6:12 am, Olaf Schinkel <tr...@schinkel.tvwrote:
>laredotorn...@zipmail.com schrieb:
>>On Jun 13, 3:49 pm, Olaf Schinkel <tr...@schinkel.tvwrote:
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.- Hide quoted text -

- Show quoted text -

Here's what I'm trying to do. We can preview a document and see what
will be on the left side or the right side ...

http://screencast.com/t/bbgzlh4aG

but we may want to trim parts (either 1/8, 1/16, 1/2, user adjusts
amount) of the pages. Below is my crude Microsoft Paint mock-up of
trimming part of the right side:

http://screencast.com/t/HkPl9kyaBCK

This could happen on both sides of the page

http://screencast.com/t/KfCRngLe

So I'd like to use some image manipulation function to generate a new
image so that when I load my image, I can call the URL of the PHP
manipulation page. So folks have suggested "gd", but what shoudl I be
searching for within that? Again, any hints you can provide are
greatly appreciated, - Dave
Well.
When you will do it at Serverside, than use gd2, on Clientside use
Javascript.
GD are graphic functions for PHP.
Look in the manual for it.
For the GD2 solution you must programm in PHP and the side will always
reload if there is a chance.
With Javascript you can do it at the client and no reload is nessesary.

I would prefer the JS solution.

Jun 27 '08 #13

This discussion thread is closed

Replies have been disabled for this discussion.