mirror of
https://github.com/docusealco/docuseal
synced 2026-11-16 16:12:32 -05:00
use load vips
This commit is contained in:
1 parent
ff57e5c6ae
commit
5f069e7a40
1 file changed
+3
-1
+3
-1
@@ -43,7 +43,9 @@ module LoadIco
|
|||||||
|
|
||||||
raise ArgumentError, 'Unable to load' unless image_data_bytes && image_data_bytes.bytesize == best_entry[:size]
|
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])
|
image = load_image_entry(image_data_bytes, best_entry[:width], best_entry[:height])
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user