use tmp file for gtk image set

This commit is contained in:
yggverse 2024-07-18 17:46:35 +03:00
parent 06a142d68f
commit 02bfe604f6

View file

@ -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
);
}
}