Skip to content

Commit

Permalink
Fix imageManipulation::outputWebpFormat() encoding (#373)
Browse files Browse the repository at this point in the history
  • Loading branch information
frasmage authored Jan 3, 2025
1 parent 2173b16 commit 387b2f7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/source/variants.rst
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ The ImageManipulation class also offers a fluent interface for defining how the
$manipulation->outputHeicFormat();
$manipulation->setOutputFormat($format);

If outputting to JPEG or HEIC format, it is also possible to set the desired level of lossy compression, from 0 (low quality, smaller file size) to 100 (high quality, larger file size). Defaults to 90. This value is ignored by other formats.
If outputting to JPEG, TIFF, WEBP, or HEIC format, it is also possible to set the desired level of lossy compression, from 0 (low quality, smaller file size) to 100 (high quality, larger file size). Defaults to 90. This value is ignored by other formats.

::

Expand Down
2 changes: 1 addition & 1 deletion src/ImageManipulator.php
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ private function imageToStream(
ImageManipulation::FORMAT_JPG => $image->toJpeg($outputQuality),
ImageManipulation::FORMAT_PNG => $image->toPng(),
ImageManipulation::FORMAT_GIF => $image->toGif(),
ImageManipulation::FORMAT_WEBP => $image->toBitmap(),
ImageManipulation::FORMAT_WEBP => $image->toWebp($outputQuality),
ImageManipulation::FORMAT_TIFF => $image->toTiff($outputQuality),
ImageManipulation::FORMAT_HEIC => $image->toHeic($outputQuality),
default => throw ImageManipulationException::unknownOutputFormat(),
Expand Down

0 comments on commit 387b2f7

Please sign in to comment.