screenshot: A couple of minor tweaks
This commit is contained in:
@@ -153,12 +153,13 @@ create_shm_buffer(int width, int height, void **data_out)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
write_png(int width, int height, void **data_out) {
|
write_png(int width, int height, void *data)
|
||||||
|
{
|
||||||
GdkPixbuf *pixbuf, *normal;
|
GdkPixbuf *pixbuf, *normal;
|
||||||
GError *error = NULL;
|
GError *error = NULL;
|
||||||
|
|
||||||
g_type_init();
|
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,
|
8, width, height, width * 4, NULL,
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
@@ -192,7 +193,7 @@ int main(int argc, char *argv[])
|
|||||||
screenshooter_shoot(screenshooter, output, buffer);
|
screenshooter_shoot(screenshooter, output, buffer);
|
||||||
roundtrip(display);
|
roundtrip(display);
|
||||||
|
|
||||||
write_png(output_width, output_height, &data);
|
write_png(output_width, output_height, data);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user