Sujet : Re: in a program like this, it makes NO difference , whether i save as PNG or GIF ? (size?)
De : greg.ewing (at) *nospam* canterbury.ac.nz (Greg Ewing)
Groupes : comp.lang.pythonDate : 03. Jul 2024, 16:36:50
Autres entêtes
Message-ID : <lel9gjF7ijsU1@mid.individual.net>
References : 1 2
User-Agent : Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:91.0) Gecko/20100101 Thunderbird/91.3.2
On 3/07/24 11:22 pm, Pieter van Oostrum wrote:
In general a 'PNG' image has better quality than 'GIF'. In a 'PNG' image all the pixels that the program generated are still present, exactly as they were generated. In a 'GIF' image, however, pixels may have been altered in order to accommodate a smaller file size.
I think you're thinking of JPEG. PNG and GIF both use lossless compression, however GIF only supports 8-bit colour and 1-bit transparency. For images with no more than 256 distinct colours, PNG and GIF will probably give identical results.
-- Greg