
On Wed, Dec 07, 2022 at 11:02:45AM +0100, Michal Prívozník wrote:
On 12/6/22 20:13, Simon Fairweather wrote:
Thanks for the update. What does this mean?
The only problem is that QEMU feeds us PPM which is not wired to PHP really.
We are using this patch to remove imageMagik as it is not required for our needs. Eric - I strip out the requirement for ImageMagick because of all the dependancies needed for that peice. ImageMagick is only used for libvirt's screenshot API calls which we dont even take advantage of in the unRAID web UI. --- a/configure.ac <http://configure.ac> 2016-10-05 22:20:39.172968837 -0500 +++ b/configure.ac <http://configure.ac> 2016-10-05 22:21:05.645301252 -0500 @@ -172,8 +172,6 @@ LIBVIRT_CHECK_PHP_EXTENSIONDIR LIBVIRT_CHECK_PHP_CONFDIR -LIBVIRT_CHECK_PHP_EXTENSION([imagick]) -
Yeah, pretty much every distro uses this patch. The problem is, without imagick the examples won't work:
libvirt-php.git/tests $ php -n -c php.ini -S localhost:8080 ../examples/index.php
BUT, here's what I can do. I just found out that QEMU added support for taking screenshots in PNG format, so I can fix libvirt to prefer that (PPM is not very well supported anyway - I haven't found a browser that would render it) and drop imagick completely. Then I can do the release and distros can then just drop the patch.
FWIW, it should be relatively easy to display a PPM using a bit of javascript and a HTML <canvas> element, as a PPM is essentially just raw bitmap data. Parsing the PPM heaer is trivial, and then at most you have a simple pixel format conversion todo. Might not be the fastest, but doable. With regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|