2

What is a palette index in libpng ?
This is the color type number 3.

   Color    Allowed    Interpretation
   Type    Bit Depths
   
   0       1,2,4,8,16  Each pixel is a grayscale sample.
   
   2       8,16        Each pixel is an R,G,B triple.
   
   3       1,2,4,8     Each pixel is a palette index;
                       a PLTE chunk must appear.
   
   4       8,16        Each pixel is a grayscale sample,
                       followed by an alpha sample.
   
   6       8,16        Each pixel is an R,G,B triple,
                       followed by an alpha sample.

Thanks !

PacCol
  • 275
  • 2
  • 15
  • 1
    Each colour is instead an index into a palette where the actual colour is found. So colour 0 might be black, colour 1 white, colour 2 red etc. etc. – john Aug 02 '20 at 17:53
  • How can I convert it into a classic color type ? – PacCol Aug 02 '20 at 17:54
  • 1
    In principle by looking up the index in the palette and replacing the index with the actual colour. How you actually achieve that in practice I have no idea. – john Aug 02 '20 at 17:55
  • 2
    It **is** ***the*** classic colour type. Kids these days with their 48-bit deep screens. Now get off my lawn! – n. m. could be an AI Aug 02 '20 at 18:31
  • Have a read here... https://stackoverflow.com/a/52307690/2836621 – Mark Setchell Aug 02 '20 at 22:14

0 Answers0