Image.php 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. <?php
  2. namespace Dy;
  3. class Image
  4. {
  5. /**
  6. * 尺寸缩放
  7. *
  8. * @param string $src 输入地址
  9. * @param string $dest 输出地址
  10. * @param integer $width 长度
  11. * @param integer $height 高度
  12. * @return void|ErrorException
  13. */
  14. public static function resize(string $src, string $dest, int $width, int $height)
  15. {
  16. }
  17. /**
  18. * 截图
  19. *
  20. * @param string $src
  21. * @param string $dest
  22. * @param integer $x
  23. * @param integer $y
  24. * @param integer $width
  25. * @param integer $height
  26. * @return void|ErrorException
  27. */
  28. public static function crop(string $src, string $dest, int $x, int $y, int $width, int $height)
  29. {
  30. }
  31. // public function water(string $src1, string $src2, string $dest, int $x, int $y, int $width, int $height) { }
  32. /**
  33. * 验证码
  34. *
  35. * @param string $dest
  36. * @param integer $width
  37. * @param integer $height
  38. * @return void|array|ErrorException
  39. */
  40. public static function captcha(string $dest, int $width, int $height)
  41. {
  42. }
  43. /**
  44. * 头像生成
  45. *
  46. * @param string $dest
  47. * @param integer $width
  48. * @param integer $padding
  49. * @return void|bool|ErrorException
  50. */
  51. public static function avatar(string $dest, int $width = 128, int $padding = 5)
  52. {
  53. }
  54. }