diff options
author | Morris Jobke <hey@morrisjobke.de> | 2020-05-04 10:06:16 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-04 10:06:16 +0200 |
commit | e10226429987f6bff3a11bf9c52f3398f2ee039c (patch) | |
tree | d0f255dad6d16eab8158611c8de25a358826e07c /lib | |
parent | 6aceb39714a0f776052cb2be5b453eb7ddd44382 (diff) | |
parent | 0c35aaba2994c2a043f48b5cf74a224c96032284 (diff) | |
download | nextcloud-server-e10226429987f6bff3a11bf9c52f3398f2ee039c.tar.gz nextcloud-server-e10226429987f6bff3a11bf9c52f3398f2ee039c.zip |
Merge pull request #20787 from nextcloud/fix/resize_wrong_mime
Fix OC_Image new resize functions
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/legacy/OC_Image.php | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/private/legacy/OC_Image.php b/lib/private/legacy/OC_Image.php index 9ef77e3d4c6..4fdbfb3909f 100644 --- a/lib/private/legacy/OC_Image.php +++ b/lib/private/legacy/OC_Image.php @@ -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; |