Advertisement
Guest User

Untitled

a guest
Oct 4th, 2017
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.33 KB | None | 0 0
  1. /**
  2. * Used to only save a specific part of the full image.<br/>
  3. * Leave any value to NULL to disable it.
  4. * @param integer|null $left
  5. * @param integer|null $top
  6. * @param integer|null $width
  7. * @param integer|null $height
  8. */
  9. public function set_crop($left=null,$top=null,$width=null,$height=null){
  10. $this->crop=array($left,$top,$width,$height);
  11. }
  12.  
  13. /**
  14. * Set the output image file format.
  15. * @param string|null $format File format (see FMT_* constants).
  16. */
  17. public function set_format($format=null){
  18. $this->format=$format;
  19. }
  20.  
  21. /**
  22. * Number of milliseconds to wait for javascript to load.
  23. * @param integer|null $delay Delay in milliseconds, or a default of 200ms if null.
  24. */
  25. public function set_delay($delay=null){
  26. $this->delay=$delay;
  27. }
  28.  
  29. /**
  30. * Set authorization credentials (for HTTP Authentication only!!).
  31. * @param string|null $username The username.
  32. * @param string|null $password The password.
  33. */
  34. public function set_credentials($username=null,$password=null){
  35. $this->login=($username || $password) ? array($username,$password) : null;
  36. }
  37.  
  38. /**
  39. * Set output image quality (for lossy formats), lower quality *might* decrease file size.
  40. * @param integer|null $quality The quality between 0(low-quality) and 100(full quality).
  41. */
  42. public function set_quality($quality=null){
  43. $this->quality=$quality;
  44. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement