mirror of
https://github.com/Intervention/image.git
synced 2025-08-29 08:40:33 +02:00
Add EncodedImage::toFilePointer()
This commit is contained in:
@@ -38,6 +38,15 @@ class EncodedImage
|
|||||||
return $this->data;
|
return $this->data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function toFilePointer()
|
||||||
|
{
|
||||||
|
$pointer = fopen('php://temp', 'rw');
|
||||||
|
fputs($pointer, $this->toString());
|
||||||
|
rewind($pointer);
|
||||||
|
|
||||||
|
return $pointer;
|
||||||
|
}
|
||||||
|
|
||||||
public function __toString(): string
|
public function __toString(): string
|
||||||
{
|
{
|
||||||
return $this->toString();
|
return $this->toString();
|
||||||
|
Reference in New Issue
Block a user