EasyPhpThumbnail Class

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    EasyPhpThumbnail Class

    The EasyPhpThumbnail Image Effects class allows you to handle image manipulation and PHP thumbnail generation for GIF, JPG and PNG on-the-fly.
    Resize, crop, rotate, flip, save as, shadow, watermark, text, border, sharpen, blur, water ripple, mirror, perspective, twirl, animation, displacement maps and more!

    1. Download EasyPhpThumbnail and upload the example directory to your webserver
    2. Upload the class (PHP4 or PHP5 version) to the 'inc' example directory
    3. Open the example.php page in your browser

    This will display a resized thumbnail. You can edit the example.php file and try one of the many examples.

    The most simple example script would be:
    PHP Code:
    <?php
    include_once('inc/easyphpthumbnail.class.php');
    $thumb = new easyphpthumbnail;
    $thumb -> Createthumb('gfx/image.jpg');
    ?>
    This would create a thumbnail with the standard settings and send the result to the browser (dynamic or on-the-fly thumbnail generation).

    If you want to integrate the thumbnail on a webpage, you have to use a dynamic image. Create a separate PHP file called for example 'thumbnail.php' and add your code there:
    PHP Code:
    <?php
    if (isset($_REQUEST['thumb'])) {
     include_once(
    'inc/easyphpthumbnail.class.php');
     
    // Your full path to the images
     
    $dir str_replace(chr(92),chr(47),getcwd()) . '/gfx/';
     
    // Create the thumbnail
     
    $thumb = new easyphpthumbnail;
     
    $thumb -> Thumbsize 300;
     
    $thumb -> Createthumb($dir basename($_REQUEST['thumb']));
    }
    ?>
    Then on your page where you need the thumbnail add a link to the image like (save this sample as photo.php):
    PHP Code:
    <?php
    $file
    ='image.jpg';
    echo 
    "<img src=\"thumbnail.php?thumb=$file\" alt=\"thumb\" />";
    ?>
    Details here: EasyPhpThumbnail Class | MyWebMyMail.com
    Attached Files
    <!DOCTYPE html PUBLIC "-//WAPFORUM.RS

    #2
    this is awesome!
    I need some facebook likes, can you please help me
    http://facebook.com/softwarefreakin
    I noticed social media is really powerful
    Well DONE is better than well SAID

    Comment


      #3
      Latest version.
      Attached Files
      <!DOCTYPE html PUBLIC "-//WAPFORUM.RS

      Comment

      Working...
      X