From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:37167) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S78h5-0006FG-Tq for qemu-devel@nongnu.org; Mon, 12 Mar 2012 13:06:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S78gz-0001AG-BN for qemu-devel@nongnu.org; Mon, 12 Mar 2012 13:05:59 -0400 Received: from mx1.redhat.com ([209.132.183.28]:15861) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S78gz-0001A9-37 for qemu-devel@nongnu.org; Mon, 12 Mar 2012 13:05:53 -0400 Date: Mon, 12 Mar 2012 17:05:47 +0000 From: "Daniel P. Berrange" Message-ID: <20120312170547.GA20435@redhat.com> References: <1331557893-30806-1-git-send-email-marcandre.lureau@redhat.com> <1331557893-30806-8-git-send-email-marcandre.lureau@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <1331557893-30806-8-git-send-email-marcandre.lureau@redhat.com> Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH/RFC 7/7] Add PNG screendump Reply-To: "Daniel P. Berrange" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?utf-8?Q?Marc-Andr=C3=A9?= Lureau Cc: =?utf-8?Q?Marc-Andr=C3=A9?= Lureau , qemu-devel@nongnu.org On Mon, Mar 12, 2012 at 02:11:33PM +0100, Marc-Andr=C3=A9 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(-) >=20 > 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" > =20 > +#ifdef CONFIG_PNG > +/* The following define is needed by pngconf.h. Otherwise it won't com= pile, > + because setjmp.h was already included by qemu-common.h. */ > +#define PNG_SKIP_SETJMP_CHECK > +#include > +#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 --=20 |: http://berrange.com -o- http://www.flickr.com/photos/dberrange= / :| |: http://libvirt.org -o- http://virt-manager.or= g :| |: http://autobuild.org -o- http://search.cpan.org/~danberr= / :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vn= c :|