可以制作灰度BMP文件吗?

发布于 2024-08-25 03:46:58 字数 93 浏览 7 评论 0原文

我正在尝试制作一个将 8 位灰度图像输出到 bmp 文件的程序。我发现8位BMP文件是有索引的。是否可以省略颜色表,只在颜色表中放入值而不是索引?或者BMP格式不允许这样?

I am trying to make a program that outputs a 8-bit grayscale image to bmp file. I have found out that 8-bit BMP files are indexed. Is it possible to omit the color table and just put values instead of indexes in the color table? Or BMP format does not allow this?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

太阳公公是暖光 2024-09-01 03:46:58

您仍然需要 LUT,但创建它非常简单。它只有 256 个条目,其中红色、绿色和蓝色分量都等于灰度强度。

You still need the LUT but it's very simple to create it. It's just 256 entries where the red, green and blue components are all equal to the grey scale intensity.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文