From 9b85329669a9bdd8205483164a43a76b056ef3ef Mon Sep 17 00:00:00 2001 From: Rickey Date: Mon, 18 May 2026 21:43:24 -0700 Subject: [PATCH] Document deprecation warning for 'getdata' method (#489) Added comments regarding the deprecation of 'getdata' in Pillow. Comment in regards to: https://github.com/GBALATRO/balatro-gba/pull/486 . Good info for anyone seeing the warning. --- scripts/generate_font.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/generate_font.py b/scripts/generate_font.py index 8a9e6f2..1d4cc89 100644 --- a/scripts/generate_font.py +++ b/scripts/generate_font.py @@ -57,6 +57,10 @@ for char_y in range(NUM_VERT_CHARS): crop_area = (pix_x, pix_y, pix_x + CHAR_WIDTH, pix_y + CHAR_HEIGHT) pixel_block_img = img.crop(crop_area) + # Note: "getdata" is a deprecated call in recent versions of pillow in + # favor of "get_flattened_data". However, as of May 17, 2026 the CI uses + # an earlier version of pillow that doesn't have "get_flattened_data" + # You can safely ignore the deprecation warning when builing on your host pixels = list(pixel_block_img.getdata()) word0 = 0