mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-01 17:15:28 +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
|
string $data
|
||||||
): void
|
): void
|
||||||
{
|
{
|
||||||
$this->gtk->set_from_resource(
|
$tmp = tmpfile();
|
||||||
|
|
||||||
|
fwrite(
|
||||||
|
$tmp,
|
||||||
$data
|
$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