summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMalf Furious <m@lfurio.us>2018-10-31 21:47:17 -0400
committerMalf Furious <m@lfurio.us>2018-10-31 21:47:17 -0400
commitcd6a58c4dd233109e0ccddd42e6b636391845036 (patch)
tree7d5a6a5da542fac0ca4701122a53516358bfb95a
parent0421aa1b60f4fe6bf140888159c58059c1013588 (diff)
parent2cf8d6be4191512567dc7498d3163627aacd1cf0 (diff)
downloadscrott-cd6a58c4dd233109e0ccddd42e6b636391845036.tar.gz
scrott-cd6a58c4dd233109e0ccddd42e6b636391845036.zip
Merge branch 'bug/more-image-mimes' into dev
-rw-r--r--app/class/image.php18
-rw-r--r--app/class/obj.class.php3
2 files changed, 15 insertions, 6 deletions
diff --git a/app/class/image.php b/app/class/image.php
index 6b73cae..62999aa 100644
--- a/app/class/image.php
+++ b/app/class/image.php
@@ -20,13 +20,19 @@
/*
* Mappings from image MIME types to PHP open/write functions
*/
-$_IMG_OPEN_FUNCS['image/jpeg'] = "imagecreatefromjpeg";
-$_IMG_OPEN_FUNCS['image/jpg'] = "imagecreatefromjpeg";
-$_IMG_OPEN_FUNCS['image/png'] = "imagecreatefrompng";
+$_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_OPEN_FUNCS['image/bmp'] = "imagecreatefrombmp";
+$_IMG_OPEN_FUNCS['image/x-ms-bmp'] = "imagecreatefrombmp";
-$_IMG_WRITE_FUNCS['image/jpeg'] = "imagejpeg";
-$_IMG_WRITE_FUNCS['image/jpg'] = "imagejpeg";
-$_IMG_WRITE_FUNCS['image/png'] = "imagepng";
+$_IMG_WRITE_FUNCS['image/jpeg'] = "imagejpeg";
+$_IMG_WRITE_FUNCS['image/jpg'] = "imagejpeg";
+$_IMG_WRITE_FUNCS['image/png'] = "imagepng";
+$_IMG_WRITE_FUNCS['image/gif'] = "imagegif";
+$_IMG_WRITE_FUNCS['image/bmp'] = "imagebmp";
+$_IMG_WRITE_FUNCS['image/x-ms-bmp'] = "imagebmp";
/*
* 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..353d617 100644
--- a/app/class/obj.class.php
+++ b/app/class/obj.class.php
@@ -30,6 +30,9 @@ class obj extends table
"image/jpeg",
"image/jpg",
"image/png",
+ "image/gif",
+ "image/bmp",
+ "image/x-ms-bmp",
);
/*