1
0
mirror of https://github.com/Intervention/image.git synced 2025-08-28 16:19:50 +02:00

Add EncodedImage::toFilePointer()

This commit is contained in:
Oliver Vogel
2023-10-04 16:56:03 +02:00
parent 1c45941711
commit 8381a59403

View File

@@ -38,6 +38,15 @@ class EncodedImage
return $this->data;
}
public function toFilePointer()
{
$pointer = fopen('php://temp', 'rw');
fputs($pointer, $this->toString());
rewind($pointer);
return $pointer;
}
public function __toString(): string
{
return $this->toString();