473,411 Members | 1,937 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,411 software developers and data experts.

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

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
12 2939
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
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
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
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
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
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
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
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
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
by: deko | last post by:
Is there any way to work around the blank space created by hidden divs? I'm trying to use a relatively postioned divs with show/hide behaviors to annotate an image. The divs show/hide...
2
by: aqualizard | last post by:
I have made and image with a caption using CSS, but I am hoping someone can show me how to do it better. By better I mean less HTML, and hopefully have it work with any sized image where I do not...
7
by: NeverLift | last post by:
I posted a very long message regarding my experiences with JavaScript, one reply was posted asking I post an example of the problem -- and both are gone! Is there a moderator that removes such...
3
by: Terry Williams | last post by:
Let me see If I can explain this correctly. This is in VB.NET, an web application Say I have an image that I want to be displayed at 140px x 140px. Someone uploads an image 300px x 150px, I...
4
by: bridgemanusa | last post by:
Hi All: I have a very long page of html that I want to take portions and hide them in divs, then show when a link is clicked. I have the hide show part working when the link is clicked, however...
17
by: Paul Watt | last post by:
Hi guys, I've got a problem again, pesky css. I have a rounded box for a login. Its a wrapper div containing three divs stacked on top of each other. In IE its fine, but in FF the divs are...
1
by: Viken Karaguesian | last post by:
Hello everyone, I have a slight problem that I can't seem to solve. I'm not sure if it's a CSS problem, HTML problem or simply an IE-6 bug. I chose this forum as I suspect the fix may be with...
11
by: don | last post by:
Hi, I have four images lined p on a single row. The HTML code is: <div id="header"> <div class="header_image"> <img id="home_logo" src="images/home_logo.gif" alt="" /> </div> <div...
1
by: zanzo | last post by:
I have a frame that includes a hidden <div> at first (before any action), the problem is that when opening the page, I have a white space, and i can't reduce the size of the frame because the content...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.