imagejpeg

Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Output image to browser or file
<?php imagejpeg(GdImage $image, resource|string|null $file = null, int $quality = -1): bool
<?php     protected function processJpeg()

    {

        ob_start();

        imagejpeg($this->image->getCore(), null, $this->quality);

        $this->image->mime = image_type_to_mime_type(IMAGETYPE_JPEG);

        $buffer = ob_get_contents();

        ob_end_clean();