throw new NotFoundException;
}
- $photo = new \OC_Image();
+ $photo = new \OCP\Image();
/** @var ISimpleFile $file */
$file = $folder->getFile('photo.' . $ext);
$photo->loadFromData($file->getContent());
$output->writeln('Importing avatar from ' . $importPath . '…');
$stream = $importSource->getFileAsStream($importPath);
- $image = new \OC_Image();
+ $image = new \OCP\Image();
$image->loadFromFileHandle($stream);
try {
}
try {
- $image = new \OC_Image();
+ $image = new \OCP\Image();
$image->loadFromData($content);
$image->readExif($content);
$image->fixOrientation();
Http::STATUS_NOT_FOUND);
}
- $image = new \OC_Image();
+ $image = new \OCP\Image();
$image->loadFromData($tmpAvatar);
$resp = new DataDisplayResponse(
Http::STATUS_BAD_REQUEST);
}
- $image = new \OC_Image();
+ $image = new \OCP\Image();
$image->loadFromData($tmpAvatar);
$image->crop($crop['x'], $crop['y'], (int)round($crop['w']), (int)round($crop['h']));
try {
use Imagick;
use OC\Color;
-use OC_Image;
use OCP\Files\NotFoundException;
use OCP\IAvatar;
use Psr\Log\LoggerInterface;
return false;
}
- $avatar = new OC_Image();
+ $avatar = new \OCP\Image();
$avatar->loadFromData($file->getContent());
return $avatar;
}
$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;
use OC\NotSquareException;
use OC\User\User;
-use OC_Image;
use OCP\Files\NotFoundException;
use OCP\Files\NotPermittedException;
use OCP\Files\SimpleFS\ISimpleFile;
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)
$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);
$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;
$zip = new ZIP($sourceTmp);
$zip->extractFile($path, $targetTmp);
- $image = new \OC_Image();
+ $image = new \OCP\Image();
$image->loadFromFile($targetTmp);
$image->fixOrientation();
// 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();
}
$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;
return null;
}
- $image = new \OC_Image();
+ $image = new \OCP\Image();
$fileName = $this->getLocalFile($file);
}
if (!is_null($picture)) {
- $image = new \OC_Image();
+ $image = new \OCP\Image();
$image->loadFromData($picture);
if ($image->valid()) {
}
}
- $imageObject = new \OC_Image();
+ $imageObject = new \OCP\Image();
$imageObject->setResource($image);
return $imageObject->valid() ? $imageObject : null;
exec($cmd, $output, $returnCode);
if ($returnCode === 0) {
- $image = new \OC_Image();
+ $image = new \OCP\Image();
$image->loadFromFile($tmpPath);
if ($image->valid()) {
unlink($tmpPath);
return null;
}
- $image = new \OC_Image();
+ $image = new \OCP\Image();
$image->loadFromData((string) $png);
$this->cleanTmpFiles();
}
//new image object
- $image = new \OC_Image();
+ $image = new \OCP\Image();
$image->loadFromData((string) $svg);
//check if image object is valid
if ($image->valid()) {
}
}
- $imageObject = new \OC_Image();
+ $imageObject = new \OCP\Image();
$imageObject->setResource($image);
return $imageObject->valid() ? $imageObject : null;