Browse Source

use tmp file for gtk image set

PHP-GTK3
yggverse 5 months ago
parent
commit
02bfe604f6
  1. 15
      src/Entity/Browser/Container/Page/Content/Image.php

15
src/Entity/Browser/Container/Page/Content/Image.php

@ -27,8 +27,21 @@ class Image @@ -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…
Cancel
Save