Welcome Guest, Not a member yet? Register   Sign In
Compress image with ci 4 library removes png transparency and Incorrect APP1 Exif
#3

(This post was last modified: 01-28-2021, 09:41 PM by Kohryu.)

(01-28-2021, 11:04 AM)paulbalandan Wrote: If you are using v4.0.4 or below, there has already been a fix for this exif error in the develop branch. The next release will fix this.

Noted with thanks.

How about the compress image?

I put below code in GDHanlder.php (save function) but it makes compress image not working, image size result still same and not compressed

Code:
imageAlphaBlending($this->resource, true);
imageSaveAlpha($this->resource, true);

Code:
case IMAGETYPE_PNG:
    imageAlphaBlending($this->resource, true);
    imageSaveAlpha($this->resource, true);

    if (! function_exists('imagepng'))
    {
        throw ImageException::forInvalidImageCreate(lang('images.pngNotSupported'));
    }

    if (! @imagepng($this->resource, $target))
    {
        throw ImageException::forSaveFailed();
    }
    break;
Reply


Messages In This Thread
RE: Compress image with ci 4 library removes png transparency and Incorrect APP1 Exif - by Kohryu - 01-28-2021, 11:58 AM



Theme © iAndrew 2016 - Forum software by © MyBB