Closed ADmad closed 6 months ago
@Art4 BTW Glide v2 doesn't interlace PNGs but you have added interlacing for all PNGs in v3. Is that intentional?
Interlacing for all png was added by @konnng-dev in Art4#1
Interlacing for all png was added by @konnng-dev in https://github.com/Art4/glide/pull/1
Hmm.. I am leaning towards reverting it and maintaining status quo.
Oh, it was indeed my fault
I can submit a new PR just interlacing JPEGS. But I would like to have option to interlace pngs on demand as well.
But I would like to have option to interlace pngs on demand as well.
You can open a separate PR for that.
Gonna merge this. Will look into JPG interlacing not working with Gd later or just state that as a limitation if me or someone else can't sort it out.
@ADmad I can confirm that interlaced JPEG doesn't work w/ GD
Looking deep, it seems it is caused by intervention GD Driver JpegEncoder. It seems the encoder clones the image instance, losing the intervention flag set.
https://github.com/Intervention/image/blob/develop/src/Drivers/Gd/Encoders/JpegEncoder.php#L19
@konnng-dev I took your changes from https://github.com/Art4/glide/pull/2 to fix interlacing.
Though when testing the generated image, interlacing doesn't seem to work for JPEGs when using GD. With Imagick
identify -verbose kayak.jpeg | grep Interlace
givesInterlace: JPEG
but with GD it givesInterlace: None
. It seems to work fine for PNGs for either driver.@Art4 BTW Glide v2 doesn't interlace PNGs but you have added interlacing for all PNGs in v3. Is that intentional?