1 | <?php |
||
20 | class ImageHelper { |
||
21 | |||
22 | /** |
||
23 | * Create new dimensions. |
||
24 | * |
||
25 | * @param Image $image The image. |
||
26 | * @param int $maxWidth The maximum width. |
||
27 | * @param int $maxHeight The maximum height. |
||
28 | * @return int[] Returns the dimensions. |
||
29 | */ |
||
30 | public static function newDimensions(Image $image, $maxWidth, $maxHeight) { |
||
56 | |||
57 | /** |
||
58 | * Create an input stream. |
||
59 | * |
||
60 | * @param Image $image The image. |
||
61 | * @return resource|null Returns the input stream in case of success, null otherwise. |
||
62 | */ |
||
63 | public static function newInputStream(Image $image) { |
||
83 | |||
84 | /** |
||
85 | * Create an output stream. |
||
86 | * |
||
87 | * @param Image $image the image. |
||
88 | * @param int $width The width. |
||
89 | * @param int $height The height. |
||
90 | * @return resource|null Returns the output stream in case of success, null otherwise. |
||
91 | */ |
||
92 | public static function newOutputStream(Image $image, $width, $height) { |
||
108 | |||
109 | /** |
||
110 | * Save an output stream. |
||
111 | * |
||
112 | * @param Image $image the image. |
||
113 | * @param resource $outputStream The output stream. |
||
114 | * @param string $pathname The pathname. |
||
115 | * @return bool Returns true in case of success, false otherwise. |
||
116 | */ |
||
117 | public static function saveOutputStream(Image $image, $outputStream, $pathname) { |
||
130 | } |
||
131 |