summaryrefslogtreecommitdiffstats
path: root/lib/private
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private')
-rw-r--r--lib/private/Avatar/Avatar.php5
-rw-r--r--lib/private/Avatar/UserAvatar.php5
-rw-r--r--lib/private/Preview/Bitmap.php2
-rw-r--r--lib/private/Preview/Bundled.php2
-rw-r--r--lib/private/Preview/Generator.php2
-rw-r--r--lib/private/Preview/HEIC.php2
-rw-r--r--lib/private/Preview/Image.php2
-rw-r--r--lib/private/Preview/MP3.php2
-rw-r--r--lib/private/Preview/MarkDown.php2
-rw-r--r--lib/private/Preview/Movie.php2
-rw-r--r--lib/private/Preview/Office.php2
-rw-r--r--lib/private/Preview/SVG.php2
-rw-r--r--lib/private/Preview/TXT.php2
13 files changed, 15 insertions, 17 deletions
diff --git a/lib/private/Avatar/Avatar.php b/lib/private/Avatar/Avatar.php
index 3bd58bb7681..f0e14ad8b2f 100644
--- a/lib/private/Avatar/Avatar.php
+++ b/lib/private/Avatar/Avatar.php
@@ -38,7 +38,6 @@ namespace OC\Avatar;
use Imagick;
use OC\Color;
-use OC_Image;
use OCP\Files\NotFoundException;
use OCP\IAvatar;
use Psr\Log\LoggerInterface;
@@ -106,7 +105,7 @@ abstract class Avatar implements IAvatar {
return false;
}
- $avatar = new OC_Image();
+ $avatar = new \OCP\Image();
$avatar->loadFromData($file->getContent());
return $avatar;
}
@@ -148,7 +147,7 @@ abstract class Avatar implements IAvatar {
$avatar->setFont($font);
$avatar->readImageBlob($svg);
$avatar->setImageFormat('png');
- $image = new OC_Image();
+ $image = new \OCP\Image();
$image->loadFromData((string)$avatar);
$data = $image->data();
return $data === null ? false : $data;
diff --git a/lib/private/Avatar/UserAvatar.php b/lib/private/Avatar/UserAvatar.php
index b46e4816fa2..6cca5a1c355 100644
--- a/lib/private/Avatar/UserAvatar.php
+++ b/lib/private/Avatar/UserAvatar.php
@@ -31,7 +31,6 @@ namespace OC\Avatar;
use OC\NotSquareException;
use OC\User\User;
-use OC_Image;
use OCP\Files\NotFoundException;
use OCP\Files\NotPermittedException;
use OCP\Files\SimpleFS\ISimpleFile;
@@ -130,7 +129,7 @@ class UserAvatar extends Avatar {
return $data;
}
- $img = new OC_Image();
+ $img = new \OCP\Image();
if (
(is_resource($data) && get_resource_type($data) === 'gd') ||
(is_object($data) && get_class($data) === \GdImage::class)
@@ -279,7 +278,7 @@ class UserAvatar extends Avatar {
$data = $this->generateAvatar($this->getDisplayName(), $size);
}
} else {
- $avatar = new OC_Image();
+ $avatar = new \OCP\Image();
$file = $this->folder->getFile('avatar.' . $ext);
$avatar->loadFromData($file->getContent());
$avatar->resize($size);
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;