diff options
author | Christopher Ng <chrng8@gmail.com> | 2022-06-02 00:37:36 +0000 |
---|---|---|
committer | Christopher Ng <chrng8@gmail.com> | 2022-06-02 00:37:36 +0000 |
commit | 57c66bf7cb772d5d6d7a17f10cd90adf48884b2d (patch) | |
tree | 1043929d764925819b9e4befe499a9ea3607ae7e /lib/private/Preview | |
parent | 4e5ed32025398e006f40e819428270d209994e03 (diff) | |
download | nextcloud-server-57c66bf7cb772d5d6d7a17f10cd90adf48884b2d.tar.gz nextcloud-server-57c66bf7cb772d5d6d7a17f10cd90adf48884b2d.zip |
Use Image class from public API
Signed-off-by: Christopher Ng <chrng8@gmail.com>
Diffstat (limited to 'lib/private/Preview')
-rw-r--r-- | lib/private/Preview/Bitmap.php | 2 | ||||
-rw-r--r-- | lib/private/Preview/Bundled.php | 2 | ||||
-rw-r--r-- | lib/private/Preview/Generator.php | 2 | ||||
-rw-r--r-- | lib/private/Preview/HEIC.php | 2 | ||||
-rw-r--r-- | lib/private/Preview/Image.php | 2 | ||||
-rw-r--r-- | lib/private/Preview/MP3.php | 2 | ||||
-rw-r--r-- | lib/private/Preview/MarkDown.php | 2 | ||||
-rw-r--r-- | lib/private/Preview/Movie.php | 2 | ||||
-rw-r--r-- | lib/private/Preview/Office.php | 2 | ||||
-rw-r--r-- | lib/private/Preview/SVG.php | 2 | ||||
-rw-r--r-- | lib/private/Preview/TXT.php | 2 |
11 files changed, 11 insertions, 11 deletions
diff --git a/lib/private/Preview/Bitmap.php b/lib/private/Preview/Bitmap.php index f7c8cf3543b..ffe5bc88856 100644 --- a/lib/private/Preview/Bitmap.php +++ b/lib/private/Preview/Bitmap.php @@ -68,7 +68,7 @@ abstract class Bitmap extends ProviderV2 { $this->cleanTmpFiles(); //new bitmap image object - $image = new \OC_Image(); + $image = new \OCP\Image(); $image->loadFromData((string) $bp); //check if image object is valid return $image->valid() ? $image : null; diff --git a/lib/private/Preview/Bundled.php b/lib/private/Preview/Bundled.php index 063c69ba5dd..df7f630dff7 100644 --- a/lib/private/Preview/Bundled.php +++ b/lib/private/Preview/Bundled.php @@ -43,7 +43,7 @@ abstract class Bundled extends ProviderV2 { $zip = new ZIP($sourceTmp); $zip->extractFile($path, $targetTmp); - $image = new \OC_Image(); + $image = new \OCP\Image(); $image->loadFromFile($targetTmp); $image->fixOrientation(); diff --git a/lib/private/Preview/Generator.php b/lib/private/Preview/Generator.php index d52191544f3..ef44188da74 100644 --- a/lib/private/Preview/Generator.php +++ b/lib/private/Preview/Generator.php @@ -217,7 +217,7 @@ class Generator { // Free memory being used by the embedded image resource. Without this the image is kept in memory indefinitely. // Garbage Collection does NOT free this memory. We have to do it ourselves. - if ($maxPreviewImage instanceof \OC_Image) { + if ($maxPreviewImage instanceof \OCP\Image) { $maxPreviewImage->destroy(); } diff --git a/lib/private/Preview/HEIC.php b/lib/private/Preview/HEIC.php index 7ce6b93ba3b..ec200defce8 100644 --- a/lib/private/Preview/HEIC.php +++ b/lib/private/Preview/HEIC.php @@ -89,7 +89,7 @@ class HEIC extends ProviderV2 { $this->cleanTmpFiles(); //new bitmap image object - $image = new \OC_Image(); + $image = new \OCP\Image(); $image->loadFromData((string) $bp); //check if image object is valid return $image->valid() ? $image : null; diff --git a/lib/private/Preview/Image.php b/lib/private/Preview/Image.php index 4bf0cb7a3d4..55e1220b56a 100644 --- a/lib/private/Preview/Image.php +++ b/lib/private/Preview/Image.php @@ -45,7 +45,7 @@ abstract class Image extends ProviderV2 { return null; } - $image = new \OC_Image(); + $image = new \OCP\Image(); $fileName = $this->getLocalFile($file); diff --git a/lib/private/Preview/MP3.php b/lib/private/Preview/MP3.php index dec838b6e5a..47d752af477 100644 --- a/lib/private/Preview/MP3.php +++ b/lib/private/Preview/MP3.php @@ -56,7 +56,7 @@ class MP3 extends ProviderV2 { } if (!is_null($picture)) { - $image = new \OC_Image(); + $image = new \OCP\Image(); $image->loadFromData($picture); if ($image->valid()) { diff --git a/lib/private/Preview/MarkDown.php b/lib/private/Preview/MarkDown.php index 929f319f57d..d3806ce6c0e 100644 --- a/lib/private/Preview/MarkDown.php +++ b/lib/private/Preview/MarkDown.php @@ -137,7 +137,7 @@ class MarkDown extends TXT { } } - $imageObject = new \OC_Image(); + $imageObject = new \OCP\Image(); $imageObject->setResource($image); return $imageObject->valid() ? $imageObject : null; diff --git a/lib/private/Preview/Movie.php b/lib/private/Preview/Movie.php index 781cbad1954..5cb66a00881 100644 --- a/lib/private/Preview/Movie.php +++ b/lib/private/Preview/Movie.php @@ -145,7 +145,7 @@ class Movie extends ProviderV2 { exec($cmd, $output, $returnCode); if ($returnCode === 0) { - $image = new \OC_Image(); + $image = new \OCP\Image(); $image->loadFromFile($tmpPath); if ($image->valid()) { unlink($tmpPath); diff --git a/lib/private/Preview/Office.php b/lib/private/Preview/Office.php index 570988aa684..6717584e887 100644 --- a/lib/private/Preview/Office.php +++ b/lib/private/Preview/Office.php @@ -83,7 +83,7 @@ abstract class Office extends ProviderV2 { return null; } - $image = new \OC_Image(); + $image = new \OCP\Image(); $image->loadFromData((string) $png); $this->cleanTmpFiles(); diff --git a/lib/private/Preview/SVG.php b/lib/private/Preview/SVG.php index a4ce4899c43..fd472083533 100644 --- a/lib/private/Preview/SVG.php +++ b/lib/private/Preview/SVG.php @@ -68,7 +68,7 @@ class SVG extends ProviderV2 { } //new image object - $image = new \OC_Image(); + $image = new \OCP\Image(); $image->loadFromData((string) $svg); //check if image object is valid if ($image->valid()) { diff --git a/lib/private/Preview/TXT.php b/lib/private/Preview/TXT.php index bb3af6b90de..f5a68f92be4 100644 --- a/lib/private/Preview/TXT.php +++ b/lib/private/Preview/TXT.php @@ -103,7 +103,7 @@ class TXT extends ProviderV2 { } } - $imageObject = new \OC_Image(); + $imageObject = new \OCP\Image(); $imageObject->setResource($image); return $imageObject->valid() ? $imageObject : null; |