thrownewException('\OC_Image::_output(): "'.$mimeType.'" is not supported when forcing a specific output format');
break;
}
}else{
$imageType=$this->imageType;
}
switch($imageType){
...
...
@@ -257,14 +261,14 @@ class OC_Image {
}
/**
* @returns resource Returns the image resource in any.
* @return resource Returns the image resource in any.
*/
publicfunctionresource(){
return$this->resource;
}
/**
* @returns Returns the raw image data.
* @return string Returns the raw image data.
*/
functiondata(){
ob_start();
...
...
@@ -299,7 +303,7 @@ class OC_Image {
/**
* (I'm open for suggestions on better method name ;)
* @brief Get the orientation based on EXIF data.
* @returns The orientation or -1 if no EXIF data is available.
* @return int The orientation or -1 if no EXIF data is available.
*/
publicfunctiongetOrientation(){
if(!is_callable('exif_read_data')){
...
...
@@ -327,7 +331,7 @@ class OC_Image {
/**
* (I'm open for suggestions on better method name ;)
* @brief Fixes orientation based on EXIF data.
* @returns bool.
* @return bool.
*/
publicfunctionfixOrientation(){
$o=$this->getOrientation();
...
...
@@ -388,8 +392,8 @@ class OC_Image {
/**
* @brief Loads an image from a local file, a base64 encoded string or a resource created by an imagecreate* function.
* @param $imageref The path to a local file, a base64 encoded string or a resource created by an imagecreate* function or a file resource (file handle).
* @returns An image resource or false on error
* @param resource|string $imageref The path to a local file, a base64 encoded string or a resource created by an imagecreate* function or a file resource (file handle).
* @return resource|false An image resource or false on error
*/
publicfunctionload($imageRef){
if(is_resource($imageRef)){
...
...
@@ -415,7 +419,7 @@ class OC_Image {
* @brief Loads an image from an open file handle.
* It is the responsibility of the caller to position the pointer at the correct place and to close the handle again.