Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Output a PNG image to either the browser or a file
<?php imagepng(    GdImage $image,    resource|string|null $file = null,    int $quality = -1,    int $filters = -1): bool
<?php         $resource = $this->image->getCore();

        imagealphablending($resource, false);

        imagesavealpha($resource, true);

        imagepng($resource, null, -1);

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

        $buffer = ob_get_contents();

        ob_end_clean();