I have a weird bug.

When I create a thumb from a png image with transparent background, the thumb filesize is larger (173,56 KB 500×339 px) than original (64,98 KB 600x407 px). I think you should see this code to understand.

Is php-gd library bugged?

有帮助吗?

解决方案

No, the GD library is not bugged. Your source image is a 8-bit PNG image (with a color palette). You're saving the resized image as a 32-bit true-color PNG file. That's why it's bigger.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top