mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-11-01 22:11:22 +01:00
image.Decode failures fell through to encoding a nil image, causing a panic. Read the image into memory instead of streaming from an open file, which also fixes file descriptors leaking on the DecodeConfig error path and for PNG images, which were never closed. Include the path in decode errors and drop the wasteful raw RGBA sized buffer preallocation. Closes #10715