Click here to Skip to main content
15,891,204 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Compare two icons(.gif) Pin
Rajesh R Subramanian15-Oct-08 21:34
professionalRajesh R Subramanian15-Oct-08 21:34 
GeneralRe: Compare two icons(.gif) Pin
Mark Salsbery15-Oct-08 6:06
Mark Salsbery15-Oct-08 6:06 
JokeRe: Compare two icons(.gif) Pin
Hamid_RT15-Oct-08 9:05
Hamid_RT15-Oct-08 9:05 
GeneralRe: Compare two icons(.gif) Pin
CPallini15-Oct-08 9:25
mveCPallini15-Oct-08 9:25 
QuestionRe: Compare two icons(.gif) Pin
Michael Schubert15-Oct-08 5:19
Michael Schubert15-Oct-08 5:19 
AnswerRe: Compare two icons(.gif) Pin
Subrat 470826615-Oct-08 17:11
Subrat 470826615-Oct-08 17:11 
GeneralRe: Compare two icons(.gif) Pin
Hamid_RT15-Oct-08 21:44
Hamid_RT15-Oct-08 21:44 
GeneralRe: Compare two icons(.gif) Pin
Subrat 470826616-Oct-08 3:46
Subrat 470826616-Oct-08 3:46 
I found the code as follow.But it isn't working fine.Please tell me the necessary modifications ASAP.

int main() {
HANDLE hBitMap = LoadImage(0, "img.bmp", IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE);
BITMAP bitmap;
GetObject(hBitMap,sizeof(BITMAP),&bitmap);
int size = bitmap.bmHeight*bitmap.bmWidth*bitmap.bmBitsPixel/8;
BYTE *lpBits = new BYTE[ size ];
GetBitmapBits((HBITMAP)hBitMap,size,lpBits );
HANDLE hBitMap2 = LoadImage(0, "img2.bmp", IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE);
BITMAP bitmap2;
GetObject(hBitMap2,sizeof(BITMAP),&bitmap2);
int size2 = bitmap2.bmHeight*bitmap2.bmWidth*bitmap2.bmBitsPix el/8;
BYTE *lpBits2 = new BYTE[ size2 ];
GetBitmapBits((HBITMAP)hBitMap2,size2,lpBits2 );
int ScreenWidth = bitmap2.bmWidth;
int ScreenHeight = bitmap2.bmHeight;
int numOfCard = 1;int x, j, k;
int cardHeight = bitmap.bmHeight;
int card_line_length = bitmap.bmWidth;
for( i = 0 ; i < ScreenWidth; i++ ) {
for( j = 0 ; j < ScreenHeight; j++ ) {
for ( k= 0; k < numOfCard; k++ ) {
int tmpY = j;
for ( x = 0; x < cardHeight; x++ ) {
if ( memcmp(lpBits2[i][tmpY],lpBits[x], card_line_length ) != 0 ) break; // we didnt find macth of a line
tmpY++; // move to next line
}
if ( x == cardHeight) {
cout << "found";
}
}
}
}
system("PAUSE");
return 0;
}
GeneralRe: Compare two icons(.gif) Pin
Hamid_RT16-Oct-08 4:10
Hamid_RT16-Oct-08 4:10 
GeneralRe: Compare two icons(.gif) Pin
Subrat 470826611-Nov-08 17:20
Subrat 470826611-Nov-08 17:20 
GeneralRe: Compare two icons(.gif) Pin
Hamid_RT12-Nov-08 5:51
Hamid_RT12-Nov-08 5:51 
QuestionC++ with Java servler Pin
AnithaSubramani15-Oct-08 3:19
AnithaSubramani15-Oct-08 3:19 
QuestionRe: C++ with Java servler Pin
David Crow15-Oct-08 3:24
David Crow15-Oct-08 3:24 
AnswerRe: C++ with Java servler Pin
AnithaSubramani15-Oct-08 3:30
AnithaSubramani15-Oct-08 3:30 
GeneralRe: C++ with Java servler Pin
David Crow15-Oct-08 4:00
David Crow15-Oct-08 4:00 
GeneralRe: C++ with Java servler Pin
led mike15-Oct-08 4:23
led mike15-Oct-08 4:23 
QuestionHow to Convert a BMP Image to a JPEG ... Pin
tns_ranjith15-Oct-08 1:35
tns_ranjith15-Oct-08 1:35 
QuestionRe: How to Convert a BMP Image to a JPEG ... Pin
Rajesh R Subramanian15-Oct-08 1:37
professionalRajesh R Subramanian15-Oct-08 1:37 
AnswerRe: How to Convert a BMP Image to a JPEG ... Pin
Michael Schubert15-Oct-08 1:56
Michael Schubert15-Oct-08 1:56 
AnswerRe: How to Convert a BMP Image to a JPEG ... Pin
tns_ranjith15-Oct-08 2:03
tns_ranjith15-Oct-08 2:03 
JokeRe: How to Convert a BMP Image to a JPEG ... Pin
CPallini15-Oct-08 5:29
mveCPallini15-Oct-08 5:29 
AnswerRe: How to Convert a BMP Image to a JPEG ... Pin
James R. Twine15-Oct-08 1:40
James R. Twine15-Oct-08 1:40 
AnswerRe: How to Convert a BMP Image to a JPEG ... Pin
Mark Salsbery15-Oct-08 6:12
Mark Salsbery15-Oct-08 6:12 
GeneralRe: How to Convert a BMP Image to a JPEG ... Pin
aa_zz26-Oct-08 21:16
aa_zz26-Oct-08 21:16 
GeneralRe: How to Convert a BMP Image to a JPEG ... Pin
Mark Salsbery27-Oct-08 4:38
Mark Salsbery27-Oct-08 4:38 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.