1
0
mirror of https://github.com/Intervention/image.git synced 2025-08-12 17:03:59 +02:00
This commit is contained in:
Oliver Vogel
2023-11-26 15:21:26 +01:00
parent 64b2ca1849
commit b95d9033ab
2 changed files with 8 additions and 8 deletions

View File

@@ -263,22 +263,22 @@ final class Image implements ImageInterface, Countable
return $this->encode(new JpegEncoder($quality)); return $this->encode(new JpegEncoder($quality));
} }
public function resize(?int $width, ?int $height): ImageInterface public function resize(?int $width = null, ?int $height = null): ImageInterface
{ {
return $this->modify(new ResizeModifier($width, $height)); return $this->modify(new ResizeModifier($width, $height));
} }
public function resizeDown(?int $width, ?int $height): ImageInterface public function resizeDown(?int $width = null, ?int $height = null): ImageInterface
{ {
return $this->modify(new ResizeDownModifier($width, $height)); return $this->modify(new ResizeDownModifier($width, $height));
} }
public function scale(?int $width, ?int $height): ImageInterface public function scale(?int $width = null, ?int $height = null): ImageInterface
{ {
return $this->modify(new ScaleModifier($width, $height)); return $this->modify(new ScaleModifier($width, $height));
} }
public function scaleDown(?int $width, ?int $height): ImageInterface public function scaleDown(?int $width = null, ?int $height = null): ImageInterface
{ {
return $this->modify(new ScaleDownModifier($width, $height)); return $this->modify(new ScaleDownModifier($width, $height));
} }

View File

@@ -287,7 +287,7 @@ interface ImageInterface extends IteratorAggregate, Countable
* @param null|int $height * @param null|int $height
* @return ImageInterface * @return ImageInterface
*/ */
public function resize(?int $width, ?int $height): ImageInterface; public function resize(?int $width = null, ?int $height = null): ImageInterface;
/** /**
* Resize image to the given width and/or height without exceeding the original dimensions * Resize image to the given width and/or height without exceeding the original dimensions
@@ -296,7 +296,7 @@ interface ImageInterface extends IteratorAggregate, Countable
* @param null|int $height * @param null|int $height
* @return ImageInterface * @return ImageInterface
*/ */
public function resizeDown(?int $width, ?int $height): ImageInterface; public function resizeDown(?int $width = null, ?int $height = null): ImageInterface;
/** /**
* Resize image to the given width and/or height and keep the original aspect ratio * Resize image to the given width and/or height and keep the original aspect ratio
@@ -305,7 +305,7 @@ interface ImageInterface extends IteratorAggregate, Countable
* @param null|int $height * @param null|int $height
* @return ImageInterface * @return ImageInterface
*/ */
public function scale(?int $width, ?int $height): ImageInterface; public function scale(?int $width = null, ?int $height = null): ImageInterface;
/** /**
* Resize image to the given width and/or height, keep the original aspect ratio * Resize image to the given width and/or height, keep the original aspect ratio
@@ -315,7 +315,7 @@ interface ImageInterface extends IteratorAggregate, Countable
* @param null|int $height * @param null|int $height
* @return ImageInterface * @return ImageInterface
*/ */
public function scaleDown(?int $width, ?int $height): ImageInterface; public function scaleDown(?int $width = null, ?int $height = null): ImageInterface;
/** /**
* Takes the given dimensions and scales it to the largest possible size matching * Takes the given dimensions and scales it to the largest possible size matching