mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
Merge pull request #20787 from nextcloud/fix/resize_wrong_mime
Fix OC_Image new resize functions
This commit is contained in:
commit
e102264299
1 changed files with 9 additions and 0 deletions
|
|
@ -1101,6 +1101,9 @@ class OC_Image implements \OCP\IImage {
|
|||
|
||||
public function cropCopy(int $x, int $y, int $w, int $h): IImage {
|
||||
$image = new OC_Image(null, $this->logger, $this->config);
|
||||
$image->imageType = $this->imageType;
|
||||
$image->mimeType = $this->mimeType;
|
||||
$image->bitDepth = $this->bitDepth;
|
||||
$image->resource = $this->cropNew($x, $y, $w, $h);
|
||||
|
||||
return $image;
|
||||
|
|
@ -1108,6 +1111,9 @@ class OC_Image implements \OCP\IImage {
|
|||
|
||||
public function preciseResizeCopy(int $width, int $height): IImage {
|
||||
$image = new OC_Image(null, $this->logger, $this->config);
|
||||
$image->imageType = $this->imageType;
|
||||
$image->mimeType = $this->mimeType;
|
||||
$image->bitDepth = $this->bitDepth;
|
||||
$image->resource = $this->preciseResizeNew($width, $height);
|
||||
|
||||
return $image;
|
||||
|
|
@ -1115,6 +1121,9 @@ class OC_Image implements \OCP\IImage {
|
|||
|
||||
public function resizeCopy(int $maxSize): IImage {
|
||||
$image = new OC_Image(null, $this->logger, $this->config);
|
||||
$image->imageType = $this->imageType;
|
||||
$image->mimeType = $this->mimeType;
|
||||
$image->bitDepth = $this->bitDepth;
|
||||
$image->resource = $this->resizeNew($maxSize);
|
||||
|
||||
return $image;
|
||||
|
|
|
|||
Loading…
Reference in a new issue