What png format should i use?

What PNG format should I use PNG 8 or PNG 24? Which one is better for the website. I am confused by this. What is fundamentally different between PNG 8 and PNG 2?

+3
source share
4 answers

Png-24. Png-24 has alpha transparency (where Png-8 has only on / off transparency).

Png-8 is indexed. Png-24 lossless.

Png-24 is better in almost every way.

http://www.elated.com/articles/understanding-image-formats/

+3
source

PNG has several modes that you can use. It may contain:

  • Greyscale
  • Indexed color commonly used by PNG-8
  • Greaycale with alpha
  • Truecolour (RGB)
  • Truecolour (RGBA), PNG-24

, 256 , . . , , . truecolour, , , -.

, . , 256 , , . ​​, . , -, , PNG-24, .

+1

, , PNG *, , PNG-24 : " " (8 ), "" "" , , , PNG-32, - (). PNG-8 (256 , 24- ) , , . GIF-; " ", "" "" , ( 256 ​​ , ). " ", " " 256 "" , PNG-8 ; , GIF , PNG-8... JPG, PNG-24; "PNG", , "" PNG-8 , , PNG-24/32 ok .

0
source

I wrote an article about this: PNG that works , which lists all the main PNG options and their trade-offs / compatibility.

In short, use PNG8 (palettes) whenever possible, as the file size is much smaller. You can have full alpha transparency in PNG8 if you use good tools (Photoshop is not suitable for PNG).

0
source

Source: https://habr.com/ru/post/1749734/


All Articles