gpt4 book ai didi

c - 反转位图图像将图像变黑。但不一致

转载 作者:太空宇宙 更新时间:2023-11-04 07:14:19 26 4
gpt4 key购买 nike

我正在尝试用一些用 C 编写的代码来否定位图图像。

  1. 当我第一次运行 Lena 图像(让我称之为 LenaImage1)的代码时,我得到了一个黑色图像 (LenaImage2)。当我在图像上运行相同的代码时,我得到了原始图像 (LenaImage1)。这意味着代码可以正常工作吗?当我使用 MATLAB 查看和保存(作为位图)LenaImage2 时,我没有得到黑色图像,这意味着我可以将其视为补充图像(MATLAB 返回相同的输出)。

  2. 当我在第二张图像 (MountainImage1) 上运行相同的 C 代码时,我得到了一张非常糟糕的图像 (MounainImage2),输出有很多伪着色,但不是黑色图像。当我在 MATLAB 中运行代码来赞美 MounainImage1 时,我得到了看起来像没有伪着色的正确图像。当我在 MountainImage2 上运行 C 代码时,我得到了原始图像(即 MountainImage1)。

在第三张图片上运行代码会显示类似于 Lena 图片的行为。所有提到的图像都可以找到here .

另一个answer提到位图图像不支持透明度。

我在这里看到的是透明度问题吗?如果是,为什么我没有在所有图像中看到此透明度问题的一致行为?另外,当我使用 MATLAB 查看和保存 LenaImage2 以及 MountainImage2 时,它没有显示黑色图像或任何伪着色,这是怎么回事?如何更正我的 C 代码?

这是反转图像的代码:

我的头文件中的文件头声明:

            #pragma pack(push,1)
typedef struct bmpFileHeader
{
unsigned short bfType; /*specifies the file type*/
unsigned long bfSize; /*specifies the size in bytes of the bitmap file*/
unsigned short bfReserved1; /*reserved; must be 0*/
unsigned short bfReserved2; /*reserved; must be 0*/
unsigned long bfOffBits; /*species the offset in bytes from the bitmapfileheader to the bitmap bits*/
}bmpFileHeader;

typedef struct bmpInfoHeader
{
unsigned long biSize; /*Size of bmpInfoHeader*/
unsigned long biWidth; /*specifies width in pixels*/
unsigned long biHeight; /*species height in pixels*/
unsigned short biPlanes; /*specifies the number of color planes, must be 1*/
unsigned short biBitCount; /*specifies the number of bit per pixel*/
unsigned long biCompression; /*spcifies the type of compression*/
unsigned long biSizeImage; /*size of image in bytes*/
unsigned long biXPelsPerMeter; /*number of pixels per meter in x axis*/
unsigned long biYPelsPerMeter; /*number of pixels per meter in y axis*/
unsigned long biClrUsed; /*number of colors used by the bitmap*/
unsigned long biClrImportant; /*number of colors that are important*/
}bmpInfoHeader;
#pragma pack(pop)

完成工作的代码:

            void ImageData(FILE *filePtr)
{
bmpFileHeader FileHeader;
bmpInfoHeader InfoHeader;
char *bmpImageData; /*array to hold the image data*/
size_t imagedataSize=0,check=0;
int y;


/*read the bitmap file header*/
check=fread(&FileHeader, sizeof(bmpFileHeader),1,filePtr);
printf("checkFileHeader=%d\n",check);

/*verify that this is a bmp file by check bitmap id*/
if (FileHeader.bfType !=0x4D42)
{
fclose(filePtr);
printf("ImageData:Is not a BMP file\n");
return;
}

/*read the bitmap info header*/
check=fread(&InfoHeader, sizeof(InfoHeader),1,filePtr);
printf("checkInfoHeader=%d\n",check);

/*Allocate space for the image data*/

bmpImageData=(char*)malloc(InfoHeader.biSizeImage);
if(bmpImageData==NULL){
printf("Couldn't allocate memory for ImageData\n");
return;
}
/*move the file position to the point where the aligned image data begins*/
check=fseek(filePtr,FileHeader.bfOffBits,SEEK_SET);
if(check!=0){
printf("Error seeking file\n");
return;
}
/*Copy the image data to bmpImageData*/
check=fread(bmpImageData,InfoHeader.biSizeImage,1,filePtr);
if(check!=1){
printf("Error reading image data\n");
return
}

/*Moving filePtr to position where image data begins*/
check=fseek(filePtr,FileHeader.bfOffBits,SEEK_SET);
if(check!=0){
printf("Error seeking file\n");
return;
}
/*Manipulating the image data*/
for(y=0;y<InfoHeader.biSizeImage;y++){
bmpImageData[y]=255-bmpImageData[y];
}
check=fwrite(bmpImageData,InfoHeader.biSizeImage,1,filePtr);
if(check!=1)
printf("Error writing image data to file");

free(bmpImageData);

}

我使用的所有图像都是具有 8 位像素深度的灰度图像。我在 x86 机器上使用 CodeBlocks IDE(GNU GCC 编译器)运行 Windows 8。

添加:这是 Lena 图像的 header 字段读取的内容:

            File Header Information
FileHeaderSize=14
bfType=4d42
bfSize=263222
bfReserved1=0
bfReserved2=0
bfOffBits=1078

Info Header Information
InfoHeaderSize=40
biSize=40
biHeight=512
biWidth=512
biPlanes=1
biBitCount=8
biCompression=0
biSizeImage=262144
biXPelsPerMeter=0
biYPelsPerMeter=0
biClrUsed=256
biClrImportant=256

最佳答案

bitcount=8,这意味着颜色表(调色板)是强制性的 - 参见 here .这意味着像素数组中的值(即您的变量 bmpImageData)不是颜色,但实际上是调色板中的索引。因此,您不能明智地直接修改 bmpImageData

因此,如果 pixel[0,0] 包含,比方说,3,您必须在调色板中查找第 3 个条目,以确定对应的颜色。

调色板应该在 BITMAPINFOHEADER 和 DIB 之后,所以它是从字节 55-435。

我建议您以十六进制打印出这些字节并查看它们。我猜你会看到它们变成了 RGBA、RGBA、RGBA,但 A(alpha 或透明度)将为零,即未使用。所以我希望它们看起来像这样,R=G=B(因为它们是灰度):

xx xx xx 00 yy yy yy 00 zz zz zz 00

然后,为了反转图像,将每个 xx 更改为 255-xx(同样 yz) 在调色板中,根本不需要处理所有 bmpImageData

我的回答有些不一致,但那是因为当我尝试调试 BMP 文件时,我只能看到一个 JPEG 文件。一个不一致之处是 DIB 和像素阵列之间的空间是 436-54 字节,即 382 字节不能被 3 或 4 整除,因此对于每个条目使用 3 或 4 字节的调色板大小来说不是很合理...但是获取十六进制数据,我们将查看是否可以更接近正确答案。

如果您使用 ImageMagick(从 here 可免费用于 Unix/Linux 和 Windows),您可以使用如下的 identify 命令来帮助您调试代码:

  identify -verbose lena.bmp

Format: BMP (Microsoft Windows bitmap image)
Class: PseudoClass
Geometry: 512x512+0+0
Units: PixelsPerCentimeter
Type: Grayscale
Base type: Grayscale
Endianess: Undefined
Colorspace: Gray
Depth: 8-bit
Channel depth:
gray: 8-bit
Channel statistics:
Pixels: 262144
Gray:
min: 28 (0.109804)
max: 244 (0.956863)
mean: 124.071 (0.486554)
standard deviation: 47.9288 (0.187956)
kurtosis: -0.839484
skewness: -0.0822738
Colors: 28
Histogram:
474: ( 28, 28, 28) #1C1C1C gray(28)
4477: ( 36, 36, 36) #242424 gray(36)
13395: ( 44, 44, 44) #2C2C2C gray(44)
15131: ( 52, 52, 52) #343434 gray(52)
9461: ( 60, 60, 60) #3C3C3C gray(60)
6569: ( 68, 68, 68) #444444 gray(68)
7027: ( 76, 76, 76) #4C4C4C gray(76)
7733: ( 84, 84, 84) #545454 gray(84)
10330: ( 92, 92, 92) #5C5C5C gray(92)
14865: (100,100,100) #646464 gray(100)
12095: (108,108,108) #6C6C6C gray(108)
11631: (116,116,116) #747474 gray(116)
16153: (124,124,124) #7C7C7C gray(124)
17429: (132,132,132) #848484 gray(132)
17623: (140,140,140) #8C8C8C gray(140)
18636: (148,148,148) #949494 gray(148)
19688: (156,156,156) #9C9C9C gray(156)
12554: (164,164,164) #A4A4A4 gray(164)
9848: (172,172,172) #ACACAC gray(172)
7380: (180,180,180) #B4B4B4 gray(180)
5589: (188,188,188) #BCBCBC gray(188)
7162: (196,196,196) #C4C4C4 gray(196)
7451: (204,204,204) #CCCCCC gray(204)
6699: (212,212,212) #D4D4D4 gray(212)
2293: (220,220,220) #DCDCDC gray(220)
425: (228,228,228) #E4E4E4 gray(228)
22: (236,236,236) #ECECEC gray(236)
4: (244,244,244) #F4F4F4 gray(244)
Colormap entries: 256
Colormap:
0: ( 0, 0, 0) #000000 gray(0)
1: (128, 0, 0) #800000 gray(128)
2: ( 0,128, 0) #008000 gray(0)
3: (128,128, 0) #808000 gray(128)
4: ( 0, 0,128) #000080 gray(0)
5: (128, 0,128) #800080 gray(128)
6: ( 0,128,128) #008080 gray(0)
7: (128,128,128) #808080 gray(128)
8: ( 28, 28, 28) #1C1C1C gray(28)
9: (140,140,140) #8C8C8C gray(140)
10: ( 84, 84, 84) #545454 gray(84)
11: (196,196,196) #C4C4C4 gray(196)
12: ( 60, 60, 60) #3C3C3C gray(60)
13: (172,172,172) #ACACAC gray(172)
14: (116,116,116) #747474 gray(116)
15: (228,228,228) #E4E4E4 gray(228)
16: ( 44, 44, 44) #2C2C2C gray(44)
17: (156,156,156) #9C9C9C gray(156)
18: (100,100,100) #646464 gray(100)
19: (212,212,212) #D4D4D4 gray(212)
20: ( 76, 76, 76) #4C4C4C gray(76)
21: (188,188,188) #BCBCBC gray(188)
22: (132,132,132) #848484 gray(132)
23: (244,244,244) #F4F4F4 gray(244)
24: ( 36, 36, 36) #242424 gray(36)
25: (148,148,148) #949494 gray(148)
26: ( 92, 92, 92) #5C5C5C gray(92)
27: (204,204,204) #CCCCCC gray(204)
28: ( 68, 68, 68) #444444 gray(68)
29: (180,180,180) #B4B4B4 gray(180)
30: (124,124,124) #7C7C7C gray(124)
31: (236,236,236) #ECECEC gray(236)
32: ( 52, 52, 52) #343434 gray(52)
33: (164,164,164) #A4A4A4 gray(164)
34: (108,108,108) #6C6C6C gray(108)
35: (220,220,220) #DCDCDC gray(220)
36: ( 0, 0, 0) #000000 gray(0)
37: ( 0, 0, 0) #000000 gray(0)
38: ( 0, 0, 0) #000000 gray(0)
39: ( 0, 0, 0) #000000 gray(0)
40: ( 0, 0, 0) #000000 gray(0)
41: ( 0, 0, 0) #000000 gray(0)
42: ( 0, 0, 0) #000000 gray(0)
43: ( 0, 0, 0) #000000 gray(0)
44: ( 0, 0, 0) #000000 gray(0)
45: ( 0, 0, 0) #000000 gray(0)
46: ( 0, 0, 0) #000000 gray(0)
47: ( 0, 0, 0) #000000 gray(0)
48: ( 0, 0, 0) #000000 gray(0)
49: ( 0, 0, 0) #000000 gray(0)
50: ( 0, 0, 0) #000000 gray(0)
51: ( 0, 0, 0) #000000 gray(0)
52: ( 0, 0, 0) #000000 gray(0)
53: ( 0, 0, 0) #000000 gray(0)
54: ( 0, 0, 0) #000000 gray(0)
55: ( 0, 0, 0) #000000 gray(0)
56: ( 0, 0, 0) #000000 gray(0)
57: ( 0, 0, 0) #000000 gray(0)
58: ( 0, 0, 0) #000000 gray(0)
59: ( 0, 0, 0) #000000 gray(0)
60: ( 0, 0, 0) #000000 gray(0)
61: ( 0, 0, 0) #000000 gray(0)
62: ( 0, 0, 0) #000000 gray(0)
63: ( 0, 0, 0) #000000 gray(0)
64: ( 0, 0, 0) #000000 gray(0)
65: ( 0, 0, 0) #000000 gray(0)
66: ( 0, 0, 0) #000000 gray(0)
67: ( 0, 0, 0) #000000 gray(0)
68: ( 0, 0, 0) #000000 gray(0)
69: ( 0, 0, 0) #000000 gray(0)
70: ( 0, 0, 0) #000000 gray(0)
71: ( 0, 0, 0) #000000 gray(0)
72: ( 0, 0, 0) #000000 gray(0)
73: ( 0, 0, 0) #000000 gray(0)
74: ( 0, 0, 0) #000000 gray(0)
75: ( 0, 0, 0) #000000 gray(0)
76: ( 0, 0, 0) #000000 gray(0)
77: ( 0, 0, 0) #000000 gray(0)
78: ( 0, 0, 0) #000000 gray(0)
79: ( 0, 0, 0) #000000 gray(0)
80: ( 0, 0, 0) #000000 gray(0)
81: ( 0, 0, 0) #000000 gray(0)
82: ( 0, 0, 0) #000000 gray(0)
83: ( 0, 0, 0) #000000 gray(0)
84: ( 0, 0, 0) #000000 gray(0)
85: ( 0, 0, 0) #000000 gray(0)
86: ( 0, 0, 0) #000000 gray(0)
87: ( 0, 0, 0) #000000 gray(0)
88: ( 0, 0, 0) #000000 gray(0)
89: ( 0, 0, 0) #000000 gray(0)
90: ( 0, 0, 0) #000000 gray(0)
91: ( 0, 0, 0) #000000 gray(0)
92: ( 0, 0, 0) #000000 gray(0)
93: ( 0, 0, 0) #000000 gray(0)
94: ( 0, 0, 0) #000000 gray(0)
95: ( 0, 0, 0) #000000 gray(0)
96: ( 0, 0, 0) #000000 gray(0)
97: ( 0, 0, 0) #000000 gray(0)
98: ( 0, 0, 0) #000000 gray(0)
99: ( 0, 0, 0) #000000 gray(0)
100: ( 0, 0, 0) #000000 gray(0)
101: ( 0, 0, 0) #000000 gray(0)
102: ( 0, 0, 0) #000000 gray(0)
103: ( 0, 0, 0) #000000 gray(0)
104: ( 0, 0, 0) #000000 gray(0)
105: ( 0, 0, 0) #000000 gray(0)
106: ( 0, 0, 0) #000000 gray(0)
107: ( 0, 0, 0) #000000 gray(0)
108: ( 0, 0, 0) #000000 gray(0)
109: ( 0, 0, 0) #000000 gray(0)
110: ( 0, 0, 0) #000000 gray(0)
111: ( 0, 0, 0) #000000 gray(0)
112: ( 0, 0, 0) #000000 gray(0)
113: ( 0, 0, 0) #000000 gray(0)
114: ( 0, 0, 0) #000000 gray(0)
115: ( 0, 0, 0) #000000 gray(0)
116: ( 0, 0, 0) #000000 gray(0)
117: ( 0, 0, 0) #000000 gray(0)
118: ( 0, 0, 0) #000000 gray(0)
119: ( 0, 0, 0) #000000 gray(0)
120: ( 0, 0, 0) #000000 gray(0)
121: ( 0, 0, 0) #000000 gray(0)
122: ( 0, 0, 0) #000000 gray(0)
123: ( 0, 0, 0) #000000 gray(0)
124: ( 0, 0, 0) #000000 gray(0)
125: ( 0, 0, 0) #000000 gray(0)
126: ( 0, 0, 0) #000000 gray(0)
127: ( 0, 0, 0) #000000 gray(0)
128: ( 0, 0, 0) #000000 gray(0)
129: ( 0, 0, 0) #000000 gray(0)
130: ( 0, 0, 0) #000000 gray(0)
131: ( 0, 0, 0) #000000 gray(0)
132: ( 0, 0, 0) #000000 gray(0)
133: ( 0, 0, 0) #000000 gray(0)
134: ( 0, 0, 0) #000000 gray(0)
135: ( 0, 0, 0) #000000 gray(0)
136: ( 0, 0, 0) #000000 gray(0)
137: ( 0, 0, 0) #000000 gray(0)
138: ( 0, 0, 0) #000000 gray(0)
139: ( 0, 0, 0) #000000 gray(0)
140: ( 0, 0, 0) #000000 gray(0)
141: ( 0, 0, 0) #000000 gray(0)
142: ( 0, 0, 0) #000000 gray(0)
143: ( 0, 0, 0) #000000 gray(0)
144: ( 0, 0, 0) #000000 gray(0)
145: ( 0, 0, 0) #000000 gray(0)
146: ( 0, 0, 0) #000000 gray(0)
147: ( 0, 0, 0) #000000 gray(0)
148: ( 0, 0, 0) #000000 gray(0)
149: ( 0, 0, 0) #000000 gray(0)
150: ( 0, 0, 0) #000000 gray(0)
151: ( 0, 0, 0) #000000 gray(0)
152: ( 0, 0, 0) #000000 gray(0)
153: ( 0, 0, 0) #000000 gray(0)
154: ( 0, 0, 0) #000000 gray(0)
155: ( 0, 0, 0) #000000 gray(0)
156: ( 0, 0, 0) #000000 gray(0)
157: ( 0, 0, 0) #000000 gray(0)
158: ( 0, 0, 0) #000000 gray(0)
159: ( 0, 0, 0) #000000 gray(0)
160: ( 0, 0, 0) #000000 gray(0)
161: ( 0, 0, 0) #000000 gray(0)
162: ( 0, 0, 0) #000000 gray(0)
163: ( 0, 0, 0) #000000 gray(0)
164: ( 0, 0, 0) #000000 gray(0)
165: ( 0, 0, 0) #000000 gray(0)
166: ( 0, 0, 0) #000000 gray(0)
167: ( 0, 0, 0) #000000 gray(0)
168: ( 0, 0, 0) #000000 gray(0)
169: ( 0, 0, 0) #000000 gray(0)
170: ( 0, 0, 0) #000000 gray(0)
171: ( 0, 0, 0) #000000 gray(0)
172: ( 0, 0, 0) #000000 gray(0)
173: ( 0, 0, 0) #000000 gray(0)
174: ( 0, 0, 0) #000000 gray(0)
175: ( 0, 0, 0) #000000 gray(0)
176: ( 0, 0, 0) #000000 gray(0)
177: ( 0, 0, 0) #000000 gray(0)
178: ( 0, 0, 0) #000000 gray(0)
179: ( 0, 0, 0) #000000 gray(0)
180: ( 0, 0, 0) #000000 gray(0)
181: ( 0, 0, 0) #000000 gray(0)
182: ( 0, 0, 0) #000000 gray(0)
183: ( 0, 0, 0) #000000 gray(0)
184: ( 0, 0, 0) #000000 gray(0)
185: ( 0, 0, 0) #000000 gray(0)
186: ( 0, 0, 0) #000000 gray(0)
187: ( 0, 0, 0) #000000 gray(0)
188: ( 0, 0, 0) #000000 gray(0)
189: ( 0, 0, 0) #000000 gray(0)
190: ( 0, 0, 0) #000000 gray(0)
191: ( 0, 0, 0) #000000 gray(0)
192: ( 0, 0, 0) #000000 gray(0)
193: ( 0, 0, 0) #000000 gray(0)
194: ( 0, 0, 0) #000000 gray(0)
195: ( 0, 0, 0) #000000 gray(0)
196: ( 0, 0, 0) #000000 gray(0)
197: ( 0, 0, 0) #000000 gray(0)
198: ( 0, 0, 0) #000000 gray(0)
199: ( 0, 0, 0) #000000 gray(0)
200: ( 0, 0, 0) #000000 gray(0)
201: ( 0, 0, 0) #000000 gray(0)
202: ( 0, 0, 0) #000000 gray(0)
203: ( 0, 0, 0) #000000 gray(0)
204: ( 0, 0, 0) #000000 gray(0)
205: ( 0, 0, 0) #000000 gray(0)
206: ( 0, 0, 0) #000000 gray(0)
207: ( 0, 0, 0) #000000 gray(0)
208: ( 0, 0, 0) #000000 gray(0)
209: ( 0, 0, 0) #000000 gray(0)
210: ( 0, 0, 0) #000000 gray(0)
211: ( 0, 0, 0) #000000 gray(0)
212: ( 0, 0, 0) #000000 gray(0)
213: ( 0, 0, 0) #000000 gray(0)
214: ( 0, 0, 0) #000000 gray(0)
215: ( 0, 0, 0) #000000 gray(0)
216: ( 0, 0, 0) #000000 gray(0)
217: ( 0, 0, 0) #000000 gray(0)
218: ( 0, 0, 0) #000000 gray(0)
219: ( 0, 0, 0) #000000 gray(0)
220: ( 0, 0, 0) #000000 gray(0)
221: ( 0, 0, 0) #000000 gray(0)
222: ( 0, 0, 0) #000000 gray(0)
223: ( 0, 0, 0) #000000 gray(0)
224: ( 0, 0, 0) #000000 gray(0)
225: ( 0, 0, 0) #000000 gray(0)
226: ( 0, 0, 0) #000000 gray(0)
227: ( 0, 0, 0) #000000 gray(0)
228: ( 0, 0, 0) #000000 gray(0)
229: ( 0, 0, 0) #000000 gray(0)
230: ( 0, 0, 0) #000000 gray(0)
231: ( 0, 0, 0) #000000 gray(0)
232: ( 0, 0, 0) #000000 gray(0)
233: ( 0, 0, 0) #000000 gray(0)
234: ( 0, 0, 0) #000000 gray(0)
235: ( 0, 0, 0) #000000 gray(0)
236: ( 0, 0, 0) #000000 gray(0)
237: ( 0, 0, 0) #000000 gray(0)
238: ( 0, 0, 0) #000000 gray(0)
239: ( 0, 0, 0) #000000 gray(0)
240: ( 0, 0, 0) #000000 gray(0)
241: ( 0, 0, 0) #000000 gray(0)
242: ( 0, 0, 0) #000000 gray(0)
243: ( 0, 0, 0) #000000 gray(0)
244: ( 0, 0, 0) #000000 gray(0)
245: ( 0, 0, 0) #000000 gray(0)
246: ( 0, 0, 0) #000000 gray(0)
247: ( 0, 0, 0) #000000 gray(0)
248: (192,192,192) #C0C0C0 gray(192)
249: (255, 0, 0) #FF0000 gray(255)
250: ( 0,255, 0) #00FF00 gray(0)
251: (255,255, 0) #FFFF00 gray(255)
252: ( 0, 0,255) #0000FF gray(0)
253: (255, 0,255) #FF00FF gray(255)
254: ( 0,255,255) #00FFFF gray(0)
255: (255,255,255) #FFFFFF gray(255)
Rendering intent: Perceptual
Gamma: 0.454545
Chromaticity:
red primary: (0.64,0.33)
green primary: (0.3,0.6)
blue primary: (0.15,0.06)
white point: (0.3127,0.329)
Background color: gray(255)
Border color: gray(223)
Matte color: gray(189)
Transparent color: gray(0)
Interlace: None
Intensity: Undefined
Compose: Over
Page geometry: 512x512+0+0
Dispose: Undefined
Iterations: 0
Compression: Undefined
Orientation: Undefined
Properties:
date:create: 2014-10-01T09:18:15+01:00
date:modify: 2002-11-25T01:33:53+00:00
signature: dcd0e6587dcdeaaba5999a9bb384473f1af19f7a4c09ffee95356ea51bec22ce
Artifacts:
filename: /Users/mark/Desktop/lena.bmp
verbose: true
Tainted: True
Filesize: 263KB
Number pixels: 262K
Pixels per second: 26.21MB
User time: 0.000u
Elapsed time: 0:01.009
Version: ImageMagick 6.8.9-7 Q16 x86_64 2014-09-10 http://www.imagemagick.org

如您所见,图像中只有 28 种独特的颜色,并且调色板仅部分填充,正如您所注意到的。

另一种可以帮助您调试代码的技术是让 ImageMagick 将整个图像转储为文本,就像这样 - 我只显示前 8 个像素,但您明白了:

convert lena.bmp -colorspace rgb txt:- | more

# ImageMagick pixel enumeration: 512,512,255,rgb
0,0: (85,85,85) #555555 rgb(85,85,85)
1,0: (95,95,95) #5F5F5F rgb(95,95,95)
2,0: (85,85,85) #555555 rgb(85,85,85)
3,0: (95,95,95) #5F5F5F rgb(95,95,95)
4,0: (95,95,95) #5F5F5F rgb(95,95,95)
5,0: (85,85,85) #555555 rgb(85,85,85)
6,0: (95,95,95) #5F5F5F rgb(95,95,95)
7,0: (85,85,85) #555555 rgb(85,85,85)

关于c - 反转位图图像将图像变黑。但不一致,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26125478/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com