summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMalf Furious <m@lfurio.us>2018-10-31 20:29:11 -0400
committerMalf Furious <m@lfurio.us>2018-10-31 20:29:11 -0400
commit175020d9acd5742d3a3cea4aa8e427ecc046b14b (patch)
tree0857fb73daa2873d8b8000ed2bdf377f52171a6e
parent288af5af9c504397916d7f680551672a5b91100f (diff)
downloadscrott-175020d9acd5742d3a3cea4aa8e427ecc046b14b.tar.gz
scrott-175020d9acd5742d3a3cea4aa8e427ecc046b14b.zip
Add bmp image support
Adds 'image/bmp' as an allowed mimetype for images. The image module is also updated to expect this new type. 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 f4c639f..591e026 100644
--- a/app/class/image.php
+++ b/app/class/image.php
@@ -24,11 +24,13 @@ $_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_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";
/*
* 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 7764888..81a0a27 100644
--- a/app/class/obj.class.php
+++ b/app/class/obj.class.php
@@ -31,6 +31,7 @@ class obj extends table
"image/jpg",
"image/png",
"image/gif",
+ "image/bmp",
);
/*