mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-03-31 16:45:27 +00:00
use tmp file for gtk image set
This commit is contained in:
parent
06a142d68f
commit
02bfe604f6
1 changed files with 14 additions and 1 deletions
|
|
@ -27,8 +27,21 @@ class Image
|
|||
string $data
|
||||
): void
|
||||
{
|
||||
$this->gtk->set_from_resource(
|
||||
$tmp = tmpfile();
|
||||
|
||||
fwrite(
|
||||
$tmp,
|
||||
$data
|
||||
);
|
||||
|
||||
$this->gtk->set_from_file(
|
||||
stream_get_meta_data(
|
||||
$tmp
|
||||
)['uri']
|
||||
);
|
||||
|
||||
fclose(
|
||||
$tmp
|
||||
);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue