Advertisement
Guest User

Joel Alejandro

a guest
Jan 19th, 2010
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.50 KB | None | 0 0
  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. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement