diff options
author | Joas Schilling <nickvergessen@owncloud.com> | 2015-03-13 10:10:11 +0100 |
---|---|---|
committer | Joas Schilling <nickvergessen@owncloud.com> | 2015-03-16 12:45:15 +0100 |
commit | 8ed27d2ce0477f40a27cdc335361b0d5654a7e09 (patch) | |
tree | de2db82b384ab3071c2c17b8e84dd560b9df993c /lib/private/image.php | |
parent | 3b7aec1b7d4e2e3a1ff6c1f7888189c67aa09b75 (diff) | |
download | nextcloud-server-8ed27d2ce0477f40a27cdc335361b0d5654a7e09.tar.gz nextcloud-server-8ed27d2ce0477f40a27cdc335361b0d5654a7e09.zip |
Create an interface for OC_Image and OCP\Image for the public API
Diffstat (limited to 'lib/private/image.php')
-rw-r--r-- | lib/private/image.php | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/private/image.php b/lib/private/image.php index 2484aeecc63..c8509c61286 100644 --- a/lib/private/image.php +++ b/lib/private/image.php @@ -15,7 +15,7 @@ /** * Class for basic image manipulation */ -class OC_Image { +class OC_Image implements \OCP\IImage { protected $resource = false; // tmp resource. protected $imageType = IMAGETYPE_PNG; // Default to png if file type isn't evident. protected $mimeType = "image/png"; // Default to png @@ -285,7 +285,7 @@ class OC_Image { /** * @return null|string Returns the raw image data. */ - function data() { + public function data() { if (!$this->valid()) { return null; } @@ -949,6 +949,9 @@ class OC_Image { return true; } + /** + * Destroys the current image and resets the object + */ public function destroy() { if ($this->valid()) { imagedestroy($this->resource); |