forked from GNUsocial/gnu-social
mimetype added to ImageFile
This commit is contained in:
parent
4b8301d39e
commit
220a13b87f
@ -53,6 +53,7 @@ class ImageFile
|
|||||||
var $width;
|
var $width;
|
||||||
var $rotate=0; // degrees to rotate for properly oriented image (extrapolated from EXIF etc.)
|
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 $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)
|
function __construct($id, $filepath)
|
||||||
{
|
{
|
||||||
@ -77,6 +78,7 @@ class ImageFile
|
|||||||
$this->width = $info[0];
|
$this->width = $info[0];
|
||||||
$this->height = $info[1];
|
$this->height = $info[1];
|
||||||
$this->type = $info[2];
|
$this->type = $info[2];
|
||||||
|
$this->mimetype = $info['mime'];
|
||||||
|
|
||||||
if ($this->type == IMAGETYPE_JPEG && function_exists('exif_read_data')) {
|
if ($this->type == IMAGETYPE_JPEG && function_exists('exif_read_data')) {
|
||||||
// Orientation value to rotate thumbnails properly
|
// Orientation value to rotate thumbnails properly
|
||||||
|
Loading…
Reference in New Issue
Block a user