473,471 Members | 4,625 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

photoIt - Make a picture look like a photo

//-------------------------
function photoIt($_pic,
$_float = 'right',
$_alt = 'Default Text') {
if ( file_exists($_pic) ) {
list($_w, $_h, $_t, $_a) = getimagesize($_pic);
$_wide = $_w + 11 + 17;
$_high = $_h + 12 + 16;
$_w .= "px";
$_h .= "px";
$_wide .= "px";
$_high .= "px";
print "<SPAN STYLE='float: $_float; border: 0px; width:
$_wide; height: $_high; ";
print "margin: 0px; padding: 0px;'>";
print "<IMG STYLE='margin: 0px; height: 12px; width: 11px;'
SRC='i/phTopLef.jpg'>";
print "<IMG STYLE='margin: 0px; height: 12px; width: $_w;'
SRC='i/phTop.jpg'>";
print "<IMG STYLE='margin: 0px; height: 12px; width: 17px;'
SRC='i/phTopRig.jpg'>";
print "<IMG STYLE='margin: 0px; height: $_h; width: 11px;'
SRC='i/phLeft.jpg'>";
print "<IMG STYLE='margin: 0px; height: $_h; width: $_w;'
ALT='$_alt' SRC='$_pic'>";
print "<IMG STYLE='margin: 0px; height: $_h; width: 17px;'
SRC='i/phRight.jpg'>";
print "<IMG STYLE='margin: 0px; height: 16px; width: 11px;'
SRC='i/phBotLef.jpg'>";
print "<IMG STYLE='margin: 0px; height: 16px; width: $_w;'
SRC='i/phBottom.jpg'>";
print "<IMG STYLE='margin: 0px; height: 16px; width: 17px;'
SRC='i/phBotRig.jpg'>";
print "</SPAN>";
} else {
print "<IMG BORDER=0 SRC='bogusPic' ALT='NO PHOTO'>";
}
}

Save the following images to your i directory:

http://nwraasoccer.com/dev/i/phTopLef.jpg
http://nwraasoccer.com/dev/i/phTop.jpg
http://nwraasoccer.com/dev/i/phTopRig.jpg
http://nwraasoccer.com/dev/i/phLeft.jpg
http://nwraasoccer.com/dev/i/phRight.jpg
http://nwraasoccer.com/dev/i/phBotLef.jpg
http://nwraasoccer.com/dev/i/phBot.jpg
http://nwraasoccer.com/dev/i/phBotRig.jpg

They are very small images.
Jul 17 '05 #1
0 1344

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

Similar topics

3
by: Ken | last post by:
I have a database called autographs.mdb that is in the "XYZ" folder in the "database" folder. I have a form in the database that I want to display a photo of the celeb on. The photos are in a...
2
by: rich | last post by:
I want to be able to add Photos to my website. At first thought I was thinking about making a table and then adding photos to each cell. I want people to not be abe to download the photos so I have...
13
by: Viken Karaguesian | last post by:
Hello everyone, Can anyone recommend a good online site to learn PHP? The W3Schools website is quite lacking - leaves much to be desired. I'm sure there are many places, but which ones are good?...
1
by: Neil | last post by:
I am using ShellExecute to open JPG files with the associated application, MS Photo Editor, from within an Access 2000 application. When the code is run the first time (Photo Editor closed),...
1
by: eldridge.brian | last post by:
I am very new to php, but eagerly picking it up. Thanks in advance for any assistance. I have a site I am working on that uses "PHP frames" - url is like http://www.xyz.com/home.php?page=photo ...
22
by: bevoldjling | last post by:
Hi ! I need some help in putting together a website for our family gathering. Although I'm still pretty "green", I don't think what I need requires terribly advanced skills ...except for one...
2
by: David Griffiths | last post by:
Hi All Using VB 2005 I have been tasked with creating simple Photo Album page on our local intranet server that can display Thumbnails and then the full picture once the thumbnail is clicked...
5
by: NJonge01 | last post by:
Greetings, I've read some great advice on similar topics, just nothing matching exactly what I'm trying I'm pretty close I think on making this work, but note quite there. I want to print a...
1
by: n2fisher | last post by:
I have a wordpress blog that I want to get a particular look from .. I've seen it elsewhere, but I can't figure out how to do it (and can't locate where I saw it before) Take a look at:...
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
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...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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...
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,...
1
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...
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...
0
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 ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.