Skip to content

Commit

Permalink
Merge pull request #11 from rico-vz/feature/toString
Browse files Browse the repository at this point in the history
  • Loading branch information
simonhamp authored Jan 8, 2024
2 parents 7208ef2 + 0c284e9 commit 16162b8
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/Image.php
Original file line number Diff line number Diff line change
Expand Up @@ -177,4 +177,11 @@ public function save(string $path, string $format = PngEncoder::class): self

return $this;
}

public function toString(string $format = PngEncoder::class): string
{
return $this->render()
->encode(new $format)
->toString();
}
}

0 comments on commit 16162b8

Please sign in to comment.