Does Netpbm formats pgm and ppm max value can be larger than 255?

时间:2015-05-04 19:46:33

标签: colors netpbm

I can't really find any documentation/information, so does netpbm formats support larger max values than 255 for color scaling and how does color scaling works anyway?

1 个答案:

答案 0 :(得分:1)

最初,Netpbm格式的PBP限制为最大值1,PGM和PPM限制为255。但是,从那以后,PGM和PPM已扩展到16位(65536)。 16位原始格式的可接受字节顺序是"网络字节顺序" (最重要的字节优先)但并非所有实现都是正确的,所以要小心。有关详细信息,请参阅 Netpbm_format维基百科页面。

关于缩放:在PBM中,0为白色,1为黑色。在PGM中,0为黑色,最大值为白色。在PPM中,0为黑色,指定的最大值分别为每个通道的红色,绿色或蓝色饱和。

由观众决定是在线性色彩空间还是其他色彩空间(大多数应用程序,包括浏览器,假设sRGB,它应该适合在显示器上显示)来解释它们。