From 4de61ce97f50d31b25b5eb72b47698b43aa79805 Mon Sep 17 00:00:00 2001 From: Fuwn Date: Tue, 21 May 2024 20:03:33 +0000 Subject: refactor(image): annotate image format case headers --- src/image.gleam | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/image.gleam b/src/image.gleam index a418ed8..39f783c 100644 --- a/src/image.gleam +++ b/src/image.gleam @@ -6,12 +6,9 @@ pub type ImageInformation { pub fn get_image_information(image) { case image { - <<0x89, 0x50, 0x4E, 0x47, 0x0D, 0x0A, 0x1A, 0x0A, _:bits>> -> - parse_png_chunks(image, 8) + <<0x89, "PNG\r\n":utf8, 0x1A, 0x0A, _:bits>> -> parse_png_chunks(image, 8) << - 0x47, - 0x49, - 0x46, + "GIF":utf8, _:16, _:unsigned, width_0:8, -- cgit v1.2.3