summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMalf Furious <m@lfurio.us>2018-10-31 20:20:10 -0400
committerMalf Furious <m@lfurio.us>2018-10-31 20:20:10 -0400
commit288af5af9c504397916d7f680551672a5b91100f (patch)
treeed85c99047f1bc72aad2944547a4e994e7d7da7d
parent0421aa1b60f4fe6bf140888159c58059c1013588 (diff)
downloadscrott-288af5af9c504397916d7f680551672a5b91100f.tar.gz
scrott-288af5af9c504397916d7f680551672a5b91100f.zip
Add gif image support
Adds 'image/gif' as an allowed mimetype for images. The image module is also updated to expect this new type. For background images, animated gifs will work properly. For head images, the cropping process truncates the image to only one frame; this is probably for the best. Signed-off-by: Malf Furious <m@lfurio.us>
-rw-r--r--app/class/image.php2
-rw-r--r--app/class/obj.class.php1
2 files changed, 3 insertions, 0 deletions
diff --git a/app/class/image.php b/app/class/image.php
index 6b73cae..f4c639f 100644
--- a/app/class/image.php
+++ b/app/class/image.php
@@ -23,10 +23,12 @@
$_IMG_OPEN_FUNCS['image/jpeg'] = "imagecreatefromjpeg";
$_IMG_OPEN_FUNCS['image/jpg'] = "imagecreatefromjpeg";
$_IMG_OPEN_FUNCS['image/png'] = "imagecreatefrompng";
+$_IMG_OPEN_FUNCS['image/gif'] = "imagecreatefromgif";
$_IMG_WRITE_FUNCS['image/jpeg'] = "imagejpeg";
$_IMG_WRITE_FUNCS['image/jpg'] = "imagejpeg";
$_IMG_WRITE_FUNCS['image/png'] = "imagepng";
+$_IMG_WRITE_FUNCS['image/gif'] = "imagegif";
/*
* Open the given image and crop it, such that the result is a square
diff --git a/app/class/obj.class.php b/app/class/obj.class.php
index 850184c..7764888 100644
--- a/app/class/obj.class.php
+++ b/app/class/obj.class.php
@@ -30,6 +30,7 @@ class obj extends table
"image/jpeg",
"image/jpg",
"image/png",
+ "image/gif",
);
/*