[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH/RFC 7/7] Add PNG screendump
From: |
Daniel P. Berrange |
Subject: |
Re: [Qemu-devel] [PATCH/RFC 7/7] Add PNG screendump |
Date: |
Mon, 12 Mar 2012 17:05:47 +0000 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Mon, Mar 12, 2012 at 02:11:33PM +0100, Marc-André Lureau wrote:
> Dump an image in PNG format if the URI ends with ".png" and PNG
> support is enabled.
> ---
> hw/vga.c | 75
> +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
> 1 files changed, 74 insertions(+), 1 deletions(-)
>
> diff --git a/hw/vga.c b/hw/vga.c
> index 9f7ca89..0210cde 100644
> --- a/hw/vga.c
> +++ b/hw/vga.c
> @@ -32,6 +32,13 @@
> #include "xen.h"
> #include "qemu_socket.h"
>
> +#ifdef CONFIG_PNG
> +/* The following define is needed by pngconf.h. Otherwise it won't compile,
> + because setjmp.h was already included by qemu-common.h. */
> +#define PNG_SKIP_SETJMP_CHECK
> +#include <png.h>
> +#endif
[snip]
I'd be inclined to just switch over to use gdk-pixbuf for saving
images. It copes with a wide array of formats, and is a natrual
fit now that we're using GLib. NB, gdk-pixbuf is distributed and
built separate from GDK/GTK, so this wouldn't create a hard dep
on GTK - you could still build with just the gdk-pixbuf support.
While allowing gdk-pixbuf to guess format based off the file
name is fine, I'd suggest we should add an explicit format argument
to the 'screendump' command. If omitted, the format would be
guessed from filename if possible.
Regards,
Daniel
--
|: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org -o- http://virt-manager.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|
- [Qemu-devel] [PATCH/RFC 0/7] Screendump to UNIX socket & in PNG format, Marc-André Lureau, 2012/03/12
- [Qemu-devel] [PATCH/RFC 2/7] Allow a qemu_fopen_socket() to be opened for writing, Marc-André Lureau, 2012/03/12
- [Qemu-devel] [PATCH/RFC 4/7] Allow saving screendump to a UNIX socket, Marc-André Lureau, 2012/03/12
- [Qemu-devel] [PATCH/RFC 7/7] Add PNG screendump, Marc-André Lureau, 2012/03/12
- Re: [Qemu-devel] [PATCH/RFC 7/7] Add PNG screendump,
Daniel P. Berrange <=
- [Qemu-devel] [PATCH/RFC 1/7] ppm_save: use QEMUFile, Marc-André Lureau, 2012/03/12
- [Qemu-devel] [PATCH/RFC 6/7] Isolate color conversion from PPM handling, Marc-André Lureau, 2012/03/12
- [Qemu-devel] [PATCH/RFC 3/7] Close socket when closing QEMUFile, Marc-André Lureau, 2012/03/12
- [Qemu-devel] [PATCH/RFC 5/7] configure: split PNG support from vnc_png feature, Marc-André Lureau, 2012/03/12
- Re: [Qemu-devel] [PATCH/RFC 0/7] Screendump to UNIX socket & in PNG format, Eric Blake, 2012/03/12
- Re: [Qemu-devel] [PATCH/RFC 0/7] Screendump to UNIX socket & in PNG format, Daniel P. Berrange, 2012/03/12
- Re: [Qemu-devel] [PATCH/RFC 0/7] Screendump to UNIX socket & in PNG format, Anthony Liguori, 2012/03/12