From: Mikael Nordfeldth Date: Wed, 25 Feb 2015 00:33:32 +0000 (+0100) Subject: mimetype added to ImageFile X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=220a13b87f061ffc7771dd80c9d442b528cbc5ec;p=quix0rs-gnu-social.git mimetype added to ImageFile --- diff --git a/lib/imagefile.php b/lib/imagefile.php index f123d47485..4ea1803f39 100644 --- a/lib/imagefile.php +++ b/lib/imagefile.php @@ -53,6 +53,7 @@ class ImageFile var $width; var $rotate=0; // degrees to rotate for properly oriented image (extrapolated from EXIF etc.) var $animated = null; // Animated image? (has more than 1 frame). null means untested + var $mimetype = null; // The _ImageFile_ mimetype, _not_ the originating File object function __construct($id, $filepath) { @@ -77,6 +78,7 @@ class ImageFile $this->width = $info[0]; $this->height = $info[1]; $this->type = $info[2]; + $this->mimetype = $info['mime']; if ($this->type == IMAGETYPE_JPEG && function_exists('exif_read_data')) { // Orientation value to rotate thumbnails properly