diff options
author | Andrey Andreev <narf@devilix.net> | 2017-01-06 12:26:08 +0100 |
---|---|---|
committer | Andrey Andreev <narf@devilix.net> | 2017-01-06 12:26:08 +0100 |
commit | 5f7302c7ea5c76fbc3fdcac88aead48deb7adcdb (patch) | |
tree | cb5590bac741ae2334af0beec9f84d73c32300f5 /system/libraries/Image_lib.php | |
parent | 3275a4e4aa3e97bcac0a53bc76cb6d607975328e (diff) |
[ci skip] Cosmetich changes to CI_Image_lib::get_image_properties()
Diffstat (limited to 'system/libraries/Image_lib.php')
-rw-r--r-- | system/libraries/Image_lib.php | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/system/libraries/Image_lib.php b/system/libraries/Image_lib.php index 9eb05c2fd..9ec44da0c 100644 --- a/system/libraries/Image_lib.php +++ b/system/libraries/Image_lib.php @@ -1644,25 +1644,26 @@ class CI_Image_lib { $this->set_error('imglib_invalid_image'); return FALSE; } + $types = array(1 => 'gif', 2 => 'jpeg', 3 => 'png'); - $mime = (isset($types[$vals[2]])) ? 'image/'.$types[$vals[2]] : 'image/jpg'; + $mime = isset($types[$vals[2]]) ? 'image/'.$types[$vals[2]] : 'image/jpg'; if ($return === TRUE) { return array( - 'width' => $vals[0], - 'height' => $vals[1], - 'image_type' => $vals[2], - 'size_str' => $vals[3], - 'mime_type' => $mime - ); - } - - $this->orig_width = $vals[0]; - $this->orig_height = $vals[1]; - $this->image_type = $vals[2]; - $this->size_str = $vals[3]; - $this->mime_type = $mime; + 'width' => $vals[0], + 'height' => $vals[1], + 'image_type' => $vals[2], + 'size_str' => $vals[3], + 'mime_type' => $mime + ); + } + + $this->orig_width = $vals[0]; + $this->orig_height = $vals[1]; + $this->image_type = $vals[2]; + $this->size_str = $vals[3]; + $this->mime_type = $mime; return TRUE; } |