Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
freekmurze committed Dec 8, 2023
1 parent 395fe9f commit ad5681b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/Drivers/Gd/GdDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -680,6 +680,8 @@ protected function pngCompression(): int

public function format(string $format): ImageDriver
{
ob_start();

switch (strtolower($format)) {
case 'jpg':
case 'jpeg':
Expand All @@ -698,6 +700,10 @@ public function format(string $format): ImageDriver
throw UnsupportedImageFormat::make($format);
}

$this->image = imagecreatefromstring(ob_get_contents());

Check failure on line 703 in src/Drivers/Gd/GdDriver.php

View workflow job for this annotation

GitHub Actions / phpstan

Parameter #1 $data of function imagecreatefromstring expects string, string|false given.

ob_end_clean();

return $this;
}
}

0 comments on commit ad5681b

Please sign in to comment.