Commit 8f063538 authored by Joas Schilling's avatar Joas Schilling
Browse files

Remove load*() methods from public interface

We shall add a factory for that in the future
parent 3052b957
......@@ -9,14 +9,13 @@
* later.
* See the COPYING-README file.
*/
namespace OCP;
namespace OCP;
/**
* Class for basic image manipulation
*/
interface IImage {
/**
* Determine whether the object contains an image resource.
*
......@@ -102,47 +101,6 @@ interface IImage {
*/
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.
*
......@@ -185,9 +143,4 @@ interface IImage {
* @return bool
*/
public function fitIn($maxWidth, $maxHeight);
/**
* Destroys the current image and resets the object
*/
public function destroy();
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment