From 5f069e7a402b7f40c684cf553a519c48c77b5be3 Mon Sep 17 00:00:00 2001 From: Pete Matsyburka Date: Sat, 30 May 2026 07:49:40 +0300 Subject: [PATCH] use load vips --- lib/load_ico.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/load_ico.rb b/lib/load_ico.rb index d956092c..633bdbdf 100644 --- a/lib/load_ico.rb +++ b/lib/load_ico.rb @@ -43,7 +43,9 @@ module LoadIco raise ArgumentError, 'Unable to load' unless image_data_bytes && image_data_bytes.bytesize == best_entry[:size] - return Vips::Image.pngload_buffer(image_data_bytes) if image_data_bytes.start_with?(PNG_SIGNATURE) + if image_data_bytes.start_with?(PNG_SIGNATURE) + return ImageUtils.load_vips(image_data_bytes, content_type: 'image/png') + end image = load_image_entry(image_data_bytes, best_entry[:width], best_entry[:height])