aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFuwn <[email protected]>2024-05-21 20:03:33 +0000
committerFuwn <[email protected]>2024-05-21 20:03:33 +0000
commit4de61ce97f50d31b25b5eb72b47698b43aa79805 (patch)
tree539519f258cf5b6d9022e1cba3f70b246a720ddc /src
parentfeat(database): more error checking (diff)
downloadmayu-4de61ce97f50d31b25b5eb72b47698b43aa79805.tar.xz
mayu-4de61ce97f50d31b25b5eb72b47698b43aa79805.zip
refactor(image): annotate image format case headers
Diffstat (limited to 'src')
-rw-r--r--src/image.gleam7
1 files 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,