简体   繁体   中英

what will happen when 32BPP PNG is displayed in the old video driver (ony 256 colors)

I am wondering under the .Net, what if the 32BPP true colored PNG is displayed in the old display card? I believe there is no palette inside PNG file.

Anyone knows the internal logic behind this scenario?

Winforms calls RealizePalette() in the paint message handler to select the default Windows halftone palette, the one returned by Graphics.GetHalftonePalette() . The code it uses is very similar to the example shown in that MSDN article. The pixels in the bitmap are mapped to one of the 256 colors in the actual realized palette when it is drawn. The visual result is of course less than stellar, the 256 color mode is in the museum one stop past the floppy disk drive.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM