캡 변화
(VC )
1 void CISLSView::OnTopHatA()
2 {
3 //
4 // [email protected]
5 //2012-8-23
6 CImage topHatImage;
7 OnOpeningGray();
8 int maxY = myImage1.GetHeight();
9 int maxX=myImage1.GetWidth();
10 byte* pRealData1;
11 byte* pRealData2;
12 pRealData1=(byte*)myImage1.GetBits();
13 pRealData2=(byte*)myImage2.GetBits();
14 int pit1=myImage1.GetPitch();
15 int pit2=myImage2.GetPitch();
16 int bitCount1=myImage1.GetBPP()/8;
17 int bitCount2=myImage2.GetBPP()/8;
18 int tempMyImage1,tempMyImage2,temp;
19 for (int y=0; y<maxY; y++) {
20 for (int x=0; x<maxX; x++) {
21 tempMyImage1=*(pRealData1+pit1*(y)+(x)*bitCount1);
22 tempMyImage2=*(pRealData2+pit2*(y)+(x)*bitCount2);
23 temp=tempMyImage1-tempMyImage2;
24 *(pRealData2+pit2*(y)+(x)*bitCount2)=temp;
25 *(pRealData2+pit2*(y)+(x)*bitCount2+1)=temp;
26 *(pRealData2+pit2*(y)+(x)*bitCount2+2)=temp;
27
28 }
29 }
30 Invalidate();
31 }
32
33
34 void CISLSView::OnTopHatB()
35 {
36 //
37 // [email protected]
38 //2012-8-23
39 CImage topHatImage;
40 OnOpeningGray();
41 int maxY = myImage1.GetHeight();
42 int maxX=myImage1.GetWidth();
43 byte* pRealData1;
44 byte* pRealData2;
45 pRealData1=(byte*)myImage1.GetBits();
46 pRealData2=(byte*)myImage2.GetBits();
47 int pit1=myImage1.GetPitch();
48 int pit2=myImage2.GetPitch();
49 int bitCount1=myImage1.GetBPP()/8;
50 int bitCount2=myImage2.GetBPP()/8;
51 int tempMyImage1,tempMyImage2,temp;
52 for (int y=0; y<maxY; y++) {
53 for (int x=0; x<maxX; x++) {
54 tempMyImage1=*(pRealData1+pit1*(y)+(x)*bitCount1);
55 tempMyImage2=*(pRealData2+pit2*(y)+(x)*bitCount2);
56 temp=tempMyImage1-tempMyImage2;
57 temp=abs(temp);
58 *(pRealData2+pit2*(y)+(x)*bitCount2)=temp;
59 *(pRealData2+pit2*(y)+(x)*bitCount2+1)=temp;
60 *(pRealData2+pit2*(y)+(x)*bitCount2+2)=temp;
61
62 }
63 }
64 Invalidate();
65 }
66
67
68 void CISLSView::OnTopHatC()
69 {
70 //
71 // [email protected]
72 //2012-8-23
73 CImage topHatImage;
74 OnClosingGray();
75 int maxY = myImage1.GetHeight();
76 int maxX=myImage1.GetWidth();
77 byte* pRealData1;
78 byte* pRealData2;
79 pRealData1=(byte*)myImage1.GetBits();
80 pRealData2=(byte*)myImage2.GetBits();
81 int pit1=myImage1.GetPitch();
82 int pit2=myImage2.GetPitch();
83 int bitCount1=myImage1.GetBPP()/8;
84 int bitCount2=myImage2.GetBPP()/8;
85 int tempMyImage1,tempMyImage2,temp;
86 for (int y=0; y<maxY; y++) {
87 for (int x=0; x<maxX; x++) {
88 tempMyImage1=*(pRealData1+pit1*(y)+(x)*bitCount1);
89 tempMyImage2=*(pRealData2+pit2*(y)+(x)*bitCount2);
90 temp=tempMyImage1-tempMyImage2;
91 *(pRealData2+pit2*(y)+(x)*bitCount2)=temp;
92 *(pRealData2+pit2*(y)+(x)*bitCount2+1)=temp;
93 *(pRealData2+pit2*(y)+(x)*bitCount2+2)=temp;
94
95 }
96 }
97 Invalidate();
98 }
99
100
101 void CISLSView::OnTopHatD()
102 {
103 //
104 // [email protected]
105 //2012-8-23
106 CImage topHatImage;
107 OnClosingGray();
108 int maxY = myImage1.GetHeight();
109 int maxX=myImage1.GetWidth();
110 byte* pRealData1;
111 byte* pRealData2;
112 pRealData1=(byte*)myImage1.GetBits();
113 pRealData2=(byte*)myImage2.GetBits();
114 int pit1=myImage1.GetPitch();
115 int pit2=myImage2.GetPitch();
116 int bitCount1=myImage1.GetBPP()/8;
117 int bitCount2=myImage2.GetBPP()/8;
118 int tempMyImage1,tempMyImage2,temp;
119 for (int y=0; y<maxY; y++) {
120 for (int x=0; x<maxX; x++) {
121 tempMyImage1=*(pRealData1+pit1*(y)+(x)*bitCount1);
122 tempMyImage2=*(pRealData2+pit2*(y)+(x)*bitCount2);
123 temp=tempMyImage1-tempMyImage2;
124 temp=abs(temp);
125 *(pRealData2+pit2*(y)+(x)*bitCount2)=temp;
126 *(pRealData2+pit2*(y)+(x)*bitCount2+1)=temp;
127 *(pRealData2+pit2*(y)+(x)*bitCount2+2)=temp;
128
129 }
130 }
131 Invalidate();
132 }
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
다양한 언어의 JSONJSON은 Javascript 표기법을 사용하여 데이터 구조를 레이아웃하는 데이터 형식입니다. 그러나 Javascript가 코드에서 이러한 구조를 나타낼 수 있는 유일한 언어는 아닙니다. 저는 일반적으로 '객체'{}...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.