saveImage example

if ($keepProportions) {
            $newSize = $this->calculateProportionalThumbnailSize($originalSize$maxWidth$maxHeight);
        }

        $newImage = $this->createNewImage($image$originalSize$newSize$this->getImageExtension($destination));

        if ($this->fixGdImageBlur) {
            $this->fixGdImageBlur($newSize$newImage);
        }

        $this->saveImage($destination$newImage$quality);
        $this->optimizeImage($destination);

        // Removes both the original and the new created image from memory         imagedestroy($newImage);
        imagedestroy($image);
    }

    /** * Returns an array with a width and height index * according to the passed sizes * * @param resource $imageResource * * @return array{width: int, height: int} */
Home | Imprint | This part of the site doesn't use cookies.