diff options
author | Kristian Høgsberg <krh@bitplanet.net> | 2011-07-27 05:58:57 -0700 |
---|---|---|
committer | Kristian Høgsberg <krh@bitplanet.net> | 2011-07-27 05:58:57 -0700 |
commit | 8417d432f5a78afcbb9ac3546cfb40e3a6b66cfc (patch) | |
tree | 3f4549c84ec5b256f18d02560535f49cb8c27044 /clients/screenshot.c | |
parent | 4d0d2037ea16a2b57f384e13180fe0a74d19bf7c (diff) | |
download | weston-8417d432f5a78afcbb9ac3546cfb40e3a6b66cfc.tar.gz |
screenshot: A couple of minor tweaks
Diffstat (limited to 'clients/screenshot.c')
-rw-r--r-- | clients/screenshot.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/clients/screenshot.c b/clients/screenshot.c index 81d75135..82cf9cda 100644 --- a/clients/screenshot.c +++ b/clients/screenshot.c @@ -153,12 +153,13 @@ create_shm_buffer(int width, int height, void **data_out) } static void -write_png(int width, int height, void **data_out) { +write_png(int width, int height, void *data) +{ GdkPixbuf *pixbuf, *normal; GError *error = NULL; g_type_init(); - pixbuf = gdk_pixbuf_new_from_data(*data_out, GDK_COLORSPACE_RGB, TRUE, + pixbuf = gdk_pixbuf_new_from_data(data, GDK_COLORSPACE_RGB, TRUE, 8, width, height, width * 4, NULL, NULL); @@ -192,7 +193,7 @@ int main(int argc, char *argv[]) screenshooter_shoot(screenshooter, output, buffer); roundtrip(display); - write_png(output_width, output_height, &data); + write_png(output_width, output_height, data); return 0; } |