URL: <https://savannah.gnu.org/bugs/?62125>
Summary: Error on read (some) 4-bit PNG images Project: GNU GRUB Submitted by: patl1729 Submitted on: Mon 28 Feb 2022 05:35:26 PM UTC Category: Terminal Severity: Major Priority: 5 - Normal Item Group: None Status: None Privacy: Public Assigned to: None Originator Name: Originator Email: Open/Closed: Open Release: Release: 2.02 Discussion Lock: Any Reproducibility: None Planned Release: None _______________________________________________________ Details: The attached PNG file is valid. It was generated by "pnmtopng"; it loads in every viewer I have tried; and it passes "pngcheck". But when I try to load it from GRUB (UEFI boot) using "background_image", I get this error: error: ../../grub-core/video/readers/png.c:595 invalid filter value Note that this image's depth is 4 bits (with a palette): $ pngcheck -v logo-save.png | head -3 File: logo-save.png (594 bytes) chunk IHDR at offset 0x0000c, length 13 640 x 480 image, 4-bit palette, non-interlaced When I modify this image to add more colors, making the depth 8 bits, GRUB can load the modified image without any trouble. Possibly related, the validation check at png.c line 286: https://git.savannah.gnu.org/cgit/grub.git/tree/grub-core/video/readers/png.c?h=grub-2.02#n286 ...specifically allows a 4-bit image depth. (Separate bug: The error message on line 290 does not match the check.) I believe others have encountered the same bug; see e.g. https://bugs.mageia.org/show_bug.cgi?id=28225 _______________________________________________________ File Attachments: ------------------------------------------------------- Date: Mon 28 Feb 2022 05:35:26 PM UTC Name: logo.png Size: 594B By: patl1729 <http://savannah.gnu.org/bugs/download.php?file_id=52942> _______________________________________________________ Reply to this item at: <https://savannah.gnu.org/bugs/?62125> _______________________________________________ Message sent via Savannah https://savannah.gnu.org/