Re: help with framing a pic



I noticed that Message-ID: <d9gupo$7mh$1@xxxxxxxxxxxxxx> from Ashok
contained the following:

>In short, something like www.framenview.com but not so complex. Just the
>picture and frames, and on selecting the frame thumbnail, picture gets
>framed.

My dropshadow function effectively puts a frame on two sides
www.ckdog.co.uk/phdropshad/

Extending that a bit gives you framing
www.ckdog.co.uk/phdropshad/corners.php

You need to create 8 images for the frame, thought this is really two
images rotated. You have 4 corners and 4 sides Call the function like
so ds(path to image, frame width, alt text) to display the framed
image. And it does it with divs, not tables.

Code follows:
<?php
//define paths to border images
define("BOT","images/bot.gif");
define("TOP","images/top.gif");
define("LEFT","images/left.gif");
define("RIGHT","images/right.gif");
define("TOP_LEFT","images/tl.gif");
define("TOP_RIGHT","images/tr.gif");
define("BOT_RIGHT","images/br.gif");
define("BOT_LEFT","images/bl.gif");


function ds($image,$dsw,$alt){
//first check that file exists
if(file_exists($image)){
//create an image from the file
$img=ImageCreateFromJpeg($image);
//print containing <div> using image width plus shadow width
print "<div style='width:
".(imagesx($img)+$dsw+$dsw)."px;margin:0px'>\n";
//print topleftcorner
print "<img style='float: left;' src='".TOP_LEFT."'
height='$dsw' width='$dsw'alt='$alt'>\n";
//print topline
print "<img style='float: left;' src='".TOP."' height='$dsw'
width='".imagesx($img)."'alt='$alt'>\n";
//print toprightcorner
print "<img style='float: left;' src='".TOP_RIGHT."'
height='$dsw' width='$dsw'alt='$alt'>\n";
//print leftline
print "<img style='float: left;' src='".LEFT."'
height='".imagesy($img)."' width='$dsw'alt='$alt'>\n";
//print image
print "<img style='float: left;' src='$image'
height='".imagesy($img)."' width='".imagesx($img)."'alt='$alt'>\n";
//print right shadow using image sizes
print "<img style='float: left;'
src='".RIGHT."'height='".imagesy($img)."'width='$dsw'alt=''>\n";
//print bottomleftcorner
print "<img style='float: left;' src='".BOT_LEFT."'
height='$dsw' width='$dsw'alt='$alt'>\n";
//print bottom shadow using image sizes
print"<img style='float: left;'
src='".BOT."'width='".imagesx($img)."'height='$dsw'alt=''>\n";
//print corner shadow using image sizes
print "<img style='float: left;'
src='".BOT_RIGHT."'height='$dsw'width='$dsw'alt=''>\n";
//print closing </div>
print "</div>\n";
}
}


--
Geoff Berrow 0110001001101100010000000110
001101101011011001000110111101100111001011
100110001101101111001011100111010101101011
.



Relevant Pages

  • Re: Parkes hi-resTV tapes of Apollo 11 surface activity
    ... > write-up on their reception of the TV images of the initial Apollo 11 ... > picture was received, it was displayed on the monitor. ... > monitor had completed displaying a full frame. ...
    (sci.space.history)
  • Parkes hi-resTV tapes of Apollo 11 surface activity
    ... write-up on their reception of the TV images of the initial Apollo 11 ... picture was received, it was displayed on the monitor. ... monitor had completed displaying a full frame. ... instrumentation recorder at a rate of 120 inches per second. ...
    (sci.space.history)
  • Re: SLR concerns, owners experiences please.
    ... near full frame. ... Even in your old bird video, unless it's entirely out of focus, I'm sure ... I congratulate on some excellent images. ... how do we know that was not the only "in focus" shot outa 30? ...
    (rec.photo.digital.slr-systems)
  • =?ISO-8859-1?Q?Re=3A_DDR=E9_SDRAM_configuration?=
    ... I want to use SDRAM as circular buffer to store images. ... yes, it's Spartan 6, the max pixel data in rate is 80MegaPixel/sec at ... buffer and the line stride within the frame. ...
    (comp.arch.fpga)
  • Re: pixel data chunks
    ... I deliberately constructed the test images to contain multiple ... fragments per frame, since as Marco describes, it is a requirement ... stream. ... One trick I use is to go the end of each fragment and walk back ...
    (comp.protocols.dicom)