|
| From: | Валентин |
| Subject: | Re: Patch for png_save(), QEMU v8.0 |
| Date: | Tue, 02 May 2023 17:37:11 +0300 |
| Thank you! Indeed, I haven't took into account big-endian hosts. (I tried "PIXMAN_BE_r8g8b8" as in ppm_save(), but didn't fix png header and got broken images). Your patch should be correct. Thank you very much! With best regards, Valentine. -------- Исходное сообщение -------- От: Peter Maydell <peter.maydell@linaro.org> Дата: 02.05.2023 16:59 (GMT+03:00) Тема: Re: Patch for png_save(), QEMU v8.0 > > Hello! > > Currently, png_save() in "console.c" uses "PIXMAN_a8r8g8b8" format when saving png. > > ( https://gitlab.com/qemu-project/qemu/-/blob/7c18f2d663521f1b31b821a13358ce38075eaf7d/ui/console.c#L314 ) > > It should probably use "PIXMAN_a8b8g8r8" (red<>blue exchanged). > Without it I'm getting PNGs with blue and red channels swapped (QEMU 8.0, qemu-system-x86_64, Arm64 host, libpng 1.6.39). Ah, I was just working on this this afternoon (it was reported last week as https://gitlab.com/qemu-project/qemu/-/issues/1622 ) and just sent a patch a minute before I read this email :-) I think your patch only fixes this problem for little-endian hosts and leaves big-endian hosts still with the wrong pixel-data order. You can see my version of the patch here: https://patchew.org/QEMU/20230502135548.2451309-1-peter.maydell@linaro.org/ thanks -- PMM |
| [Prev in Thread] | Current Thread | [Next in Thread] |