CODE - Photo-ize your pix

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Kenneth A. Holm III

    #1

    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($_p ic) ) {
    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'>";
    }
    }


















Working...