Software and Snippets
For web developers who are seeking a way to add a flash photo slide show, this software is exceptional. It’s PHP based and easy to set up. You can set up your slides to transition in various ways, use zoom and motion to add more interactivity. The website offers complete tutorials as well as sample code - I suggest using it as you might miss some of the really neat things this software can do. click here for PHP/SWF Slideshow.
Here’s a neat little snippet, I often use this php code to display images in one specific width and calculate the height in proportion to the width. Works great with jpg’s but rendering is a bit off with gif’s. I use it to expand images or to display thumbnails.
Here’s an example of where I use it - Las Vegas Golf Adventures - click on any of the golf courses and over to the right are the photos - these photos are larger or smaller than the width of 200, but for a more uniform look throughout the website, I use the snippet below and render all images at a width of 200.
$abswidth = “150″; //set the maximum width of the image
$image = “/path/to/image”; //the exact path to the image you want to resize
$size = getimagesize($image);
$calc = $size[0]/$abswidth;
$height=floor($size[1] / $calc);
echo “< img src=’$image’ width=’$abswidth’ height=’$height’ alt=”>”;
?>
Posted in Code