473,604 Members | 2,487 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2955
la***********@z ipmail.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***********@z ipmail.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...@z ipmail.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***********@z ipmail.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*******@attgl obal.net
=============== ===

Jun 27 '08 #5
la***********@z ipmail.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***********@z ipmail.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***********@z ipmail.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*******@attgl obal.net
=============== ===
Jun 27 '08 #8
Olaf Schinkel wrote:
la***********@z ipmail.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*******@attgl obal.net
=============== ===
Jun 27 '08 #9
la***********@z ipmail.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*******@attgl obal.net
=============== ===
Jun 27 '08 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
6281
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 onMouseOver/onMouseOut but leave a blank space on the page when hidden (the space where the divs would normally be). Is it possible to use z-indexing to put regular content where the hidden divs would be? When I try to do this, the layers don't unhide as...
2
5259
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 have to hard code the width of the container that holds the image. Here is a description: I want to have an image with a caption underneath, aligned on the left. There should be a black keyline around the image, and the caption underneath, and...
7
2744
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 stuff? In any case, here is the issue in brief: I want to keep the page invisible while my onload script decides how to format it, setting colors, downloads images, etc. The style "visibility:hidden" in the body tag almost does it -- except...
3
1407
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 know how to resize the image, but I want to take the short side and pad it with white space, so the image is perfectly blocked.
4
4217
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 I would really like to use linked images instead to do the following: - When open.gif is clicked, the contents of the div show and open.gif is swapped with close.gif - subsequently, when close.gif is clicked, the div contents get hidden
17
1502
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 seperated. I've tried IMG{display:block}, I've tried IMG{vertical align:bottom}. I've set margins to 0, i've set line height to 0. Now what? http://www.paulwatt.info/test/supply/ Cheers
1
3472
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 CSS. I have styled hyperlinks on a website to show a small "new window" icon when I have a link that opens in a new window. This works as designed in FF. In IE-6, however, when a hyperlink wraps to the next line, the icon does not wrap along...
11
1876
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 class="header_image"> <img id="acc_spinning_logo" src="images/acc_spinning_logo.gif"
1
2420
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 of the <div> will not appear! how to hide the white space of the frame without reducing it's size?!?
0
8419
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8280
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6739
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
5882
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5441
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
3907
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
3955
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2434
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
1266
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.