473,382 Members | 1,348 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,382 software developers and data experts.

CODE - Photo-ize your pix

Easy function that makes a pic look like a 3D photo. Needed images are
included. Place images in directory called i

//-------------------------
function photoIt($_pic,
$_float = 'right',
$_alt = 'PCXPRESS') {
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'>";
}
}






Jul 17 '05 #1
0 1410

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

Similar topics

5
by: Philip D Heady | last post by:
Ok, here's my code. Can't get it to check file extension properly or file size...had it working before but not sure why it's buggy now. } elseif ($photo) { $ext = strtolower(substr($photo,...
2
by: Eric McDaniel | last post by:
I am trying to read in a bunch of images and manipulate them using Image::Magick, then display them using Tk::Photo. I would like to do this without creating a temp file for each image, since there...
9
by: fleemo17 | last post by:
I'm hoping a CSS guru can help me with what seems like a simple enough goal. What I'm going for is a large photo centered in the browser with text positioned on top of it. Using the CSS below,...
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...
1
by: Bill Strass | last post by:
I have a form showing the records of different people. I would like a photo to be displayed in the form, with each person's record. My digital photo > *.jpg type file and I change each photo...
3
by: Guadala Harry | last post by:
Here's the functionality I'm after: I need for a page to display a photo. When users click on other links within the page, the photo changes. I'd like to swap out the photo without doing a...
2
by: RC | last post by:
I want to display photos and when the user clicks on one the photo gets displayed in its own window. This is what I"m currently using. <A id="picAnchor" target="_blank"...
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: Throw | last post by:
G'day everyone I'm looking for a simple photo gallery script in PHP (or Perl), but not too simple. I have tried several photo gallery scripts in either language and I have found that they are...
3
by: boyet59 | last post by:
VerosMedia.com offers professional, digital retouching and photo restoration services. ** Restoration of treasured, family photographs. ** Portrait and model portfolio retouching. ** Photo...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.