daily pastebin goal
8%
SHARE
TWEET

Thumb PHP

a guest Jul 16th, 2013 52 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.  
  3. require_once 'class/Upload.class.php';
  4. $largura = 220;
  5. $altura = 150;
  6.  
  7. if ( isset( $_GET['w'] ) ):
  8.     $largura = $_GET['w'];
  9. endif;
  10. if ( isset( $_GET['h'] ) ):
  11.     $altura = $_GET['h'];
  12. endif;
  13.  
  14. $handle = new upload( $pic = $_GET['img'] );
  15. $handle->image_resize = true;
  16. $handle->image_ratio_crop = true;
  17. $handle->image_x = $largura;
  18. $handle->image_y = $altura;
  19. //$handle->image_ratio_y = true;
  20. $handle->image_convert = 'jpg';
  21. $handle->jpeg_quality = 90;
  22. @header( 'Content-type: ' . $handle->file_src_mime );
  23. echo $handle->Process();
  24. die();
  25. ?>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top