mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 08:13:54 -06:00
pixman: fix vnc tight png/jpeg support
This patch adds an x argument to qemu_pixman_linebuf_fill so it can also be used to convert a partial scanline. Then fix tight + png/jpeg encoding by passing in the x+y offset, so the data is read from the correct screen location instead of the upper left corner. Cc: 1087974@bugs.launchpad.net Cc: qemu-stable@nongnu.org Reported-by: Tim Hardeneck <thardeck@suse.de> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
This commit is contained in:
parent
f27b2e1dfe
commit
bc210eb163
5 changed files with 7 additions and 7 deletions
2
hw/vga.c
2
hw/vga.c
|
@ -2413,7 +2413,7 @@ void ppm_save(const char *filename, struct DisplaySurface *ds, Error **errp)
|
|||
}
|
||||
linebuf = qemu_pixman_linebuf_create(PIXMAN_BE_r8g8b8, width);
|
||||
for (y = 0; y < height; y++) {
|
||||
qemu_pixman_linebuf_fill(linebuf, ds->image, width, y);
|
||||
qemu_pixman_linebuf_fill(linebuf, ds->image, width, 0, y);
|
||||
clearerr(f);
|
||||
ret = fwrite(pixman_image_get_data(linebuf), 1,
|
||||
pixman_image_get_stride(linebuf), f);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue