JamesHeinrich / phpThumb

phpThumb() - The PHP thumbnail generator
Other
315 stars 141 forks source link

Force PNGs to be 8-bit #198

Open martbean opened 1 year ago

martbean commented 1 year ago

I'm processing some logo files which are flat colours. If I convert them to PNG the files are always PNG-24 but ideally they should be PNG-8 as output files would be around a third of the size. Is there a way of forcing this? I've tried fltr[]=rcd|128 which partially works but results in a grey background, even though I'm setting bg=FFFFFF

The only workaround I've found for now is to use GIF instead, which isn't ideal. Any ideas?