1 | <?php |
||
23 | class ImageHelper { |
||
24 | |||
25 | /** |
||
26 | * Create new dimensions. |
||
27 | * |
||
28 | * @param Image $image The image. |
||
29 | * @param int $maxWidth The maximum width. |
||
30 | * @param int $maxHeight The maximum height. |
||
31 | * @return int[] Returns the dimensions. |
||
32 | */ |
||
33 | public static function newDimensions(Image $image, $maxWidth, $maxHeight) { |
||
59 | |||
60 | /** |
||
61 | * Create an input stream. |
||
62 | * |
||
63 | * @param Image $image The image. |
||
64 | * @return resource|null Returns the input stream in case of success, null otherwise. |
||
65 | */ |
||
66 | public static function newInputStream(Image $image) { |
||
86 | |||
87 | /** |
||
88 | * Create an output stream. |
||
89 | * |
||
90 | * @param Image $image the image. |
||
91 | * @param int $width The width. |
||
92 | * @param int $height The height. |
||
93 | * @return resource|null Returns the output stream in case of success, null otherwise. |
||
94 | */ |
||
95 | public static function newOutputStream(Image $image, $width, $height) { |
||
111 | |||
112 | /** |
||
113 | * Save an output stream. |
||
114 | * |
||
115 | * @param Image $image the image. |
||
116 | * @param resource $outputStream The output stream. |
||
117 | * @param string $pathname The pathname. |
||
118 | * @return bool Returns true in case of success, false otherwise. |
||
119 | */ |
||
120 | public static function saveOutputStream(Image $image, $outputStream, $pathname) { |
||
133 | } |
||
134 |