Remove load*() methods from public interface
We shall add a factory for that in the future
This commit is contained in:
parent
3052b9571e
commit
8f06353882
|
@ -9,14 +9,13 @@
|
||||||
* later.
|
* later.
|
||||||
* See the COPYING-README file.
|
* See the COPYING-README file.
|
||||||
*/
|
*/
|
||||||
namespace OCP;
|
|
||||||
|
|
||||||
|
namespace OCP;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class for basic image manipulation
|
* Class for basic image manipulation
|
||||||
*/
|
*/
|
||||||
interface IImage {
|
interface IImage {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Determine whether the object contains an image resource.
|
* Determine whether the object contains an image resource.
|
||||||
*
|
*
|
||||||
|
@ -102,47 +101,6 @@ interface IImage {
|
||||||
*/
|
*/
|
||||||
public function fixOrientation();
|
public function fixOrientation();
|
||||||
|
|
||||||
/**
|
|
||||||
* Loads an image from a local file, a base64 encoded string or a resource created by an imagecreate* function.
|
|
||||||
*
|
|
||||||
* @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
|
|
||||||
*/
|
|
||||||
public function load($imageRef);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 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.
|
|
||||||
*
|
|
||||||
* @param resource $handle
|
|
||||||
* @return resource|false An image resource or false on error
|
|
||||||
*/
|
|
||||||
public function loadFromFileHandle($handle);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Loads an image from a local file.
|
|
||||||
*
|
|
||||||
* @param bool|string $imagePath The path to a local file.
|
|
||||||
* @return bool|resource An image resource or false on error
|
|
||||||
*/
|
|
||||||
public function loadFromFile($imagePath = false);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Loads an image from a string of data.
|
|
||||||
*
|
|
||||||
* @param string $str A string of image data as read from a file.
|
|
||||||
* @return bool|resource An image resource or false on error
|
|
||||||
*/
|
|
||||||
public function loadFromData($str);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Loads an image from a base64 encoded string.
|
|
||||||
*
|
|
||||||
* @param string $str A string base64 encoded string of image data.
|
|
||||||
* @return bool|resource An image resource or false on error
|
|
||||||
*/
|
|
||||||
public function loadFromBase64($str);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Resizes the image preserving ratio.
|
* Resizes the image preserving ratio.
|
||||||
*
|
*
|
||||||
|
@ -185,9 +143,4 @@ interface IImage {
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public function fitIn($maxWidth, $maxHeight);
|
public function fitIn($maxWidth, $maxHeight);
|
||||||
|
|
||||||
/**
|
|
||||||
* Destroys the current image and resets the object
|
|
||||||
*/
|
|
||||||
public function destroy();
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue