从Format24bppRgb转换为Format8bppIndexed会扭曲图像 [英] Converting from Format24bppRgb to Format8bppIndexed distorts the image

查看:391
本文介绍了从Format24bppRgb转换为Format8bppIndexed会扭曲图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将这个位图从Format24bppRgb转换为Format8bppIndexed:

I convert a bitmap from Format24bppRgb to Format8bppIndexed this way:

展开 | 选择 | Wrap | 行号

推荐答案

提示:在编写问题时,工具栏上有一个按钮,用于包装复制/粘贴代码周围的[code]标记。它有助于一堆。它的按钮上有一个''#''。 有关标签的更多信息。他们很酷。 Check''em出来。
TIP: When you are writing your question, there is a button on the tool bar that wraps the [code] tags around your copy/pasted code. It helps a bunch. Its the button with a ''#'' on it. More on tags. They''re cool. Check''em out.


转换图像还有很多其他内容。

下面是煮沸的图片。来自另一篇文章的样本。
http:// www .codeproject.com / KB / graphi ... lor_depth.aspx

There is a lot more to converting an image than that.
Below is a "boiled down" sample that comes from another article.
http://www.codeproject.com/KB/graphi...lor_depth.aspx

展开 | 选择 | Wrap | 行号


你好tlhintoq,

非常感谢你的asnwer。我使用samlpe从Format24bppRgb转换为Format8bppIndexed,但结果图像丢失了一些颜色数据。我觉得probmel在MatchColors函数中,但是我找不到它......如果你能帮助我,我会很感激。
Hello tlhintoq,
Thank you very much for your asnwer. I used the samlpe to convert from Format24bppRgb to Format8bppIndexed but yet the resulting image loses some color data. I feel the probmel is in MatchColors function, but I can not find it... I would be thankful if you could help me.


这篇关于从Format24bppRgb转换为Format8bppIndexed会扭曲图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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