SHARE
TWEET

Joel Alejandro

a guest Jan 19th, 2010 53 Never
  1. <?php
  2.  
  3. ## thumbnail.php
  4.  
  5. require("csImage.lib.php");
  6.  
  7. header("Content-Type: image/jpeg"); # Change content-type according to your image.
  8.  
  9. # Parameters:
  10. #
  11. # $image: the filename of the image to open.
  12. # $scale: "w" for scaling by width, "h" for scaling by height.
  13. # $sizeInPixels: max size of the given proportion at $scale.
  14. # $writeToNewFile: true for creating an image file and returning the path, false for returning the image binary content.
  15.  
  16. echo csImage::scaleImage($image, "h", 100, false);
  17.  
  18. ?>
RAW Paste Data
Top