如何重新present 18bit的色深1​​6bit的以色深? [英] How to represent 18bit color depth to 16bit color depth?

查看:532
本文介绍了如何重新present 18bit的色深1​​6bit的以色深?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我移植,从16位色彩深度打造以18bit的色彩深度软件。我怎么能转换成16位色18位色?谢谢你。

I'm porting a software that build from 16bit color depth to 18bit color depth. How can I convert the 16-bit colors to 18-bit colors? Thanks.

推荐答案

不知道该设备,我只能猜测。装置通常红,绿,蓝这样每种颜色会得到变化的6位。也就是说,每一种颜色和总共262,144种颜色的64变体。

Without knowing the device, I can only speculate. Devices are typically Red, Green, Blue so each color would get 6 bits of variation. That means 64 variations of each color and a total of 262,144 colors.

任何位图可以扩展到该显示器。如果你把每个组件(例如,红色),规范它,然后乘以64,你将有缩放版本。

Any bitmap can be scaled to this display. If you take each component (say, red), normalize it, then multiply by 64, you'll have the scaled version.

如果你问别的东西或想了解更多详细信息,请询问。

If you are asking something else or want more detail, please ask.

更新:

有两个16比特的位图格式。一个是5-5-5(每像素5比特),另一种是5-6-5(绿色获得一个额外的位)。我假设5-5-5此转换的缘故。

Update:
There are two 16-bit bitmap formats. One is 5-5-5 (5 bits per pixel) and the other is 5-6-5 (green gets an extra bit). I'll assume 5-5-5 for the sake of this conversion.

有关你需要这样的事情每个像素内的每个色彩:

For each color within each pixel you need something like this:

NewColor = (oldColor/32.0)*64

这会变成旧的颜色分为0.0和1.0,然后之间的数字缩放到新的值的范围。

This will turn the old color into a number between 0.0 and 1.0 and then scale it up to the new value range.

这篇关于如何重新present 18bit的色深1​​6bit的以色深?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆