View Single Post
  #1 (permalink)  
Old January 27th, 2005, 08:35 AM
ck ck is offline
Authorized User
 
Join Date: Dec 2004
Posts: 34
Thanks: 0
Thanked 0 Times in 0 Posts
Default What Wrong Of My Code

hi,
 can some1 help me check wat wrong of my code? i using OpenCV library, is a library for image processing which support visual C++...so, the code below is the load image code, is work, but cant load exactly in the control, means it the image larger than the static control i fixed....hear from you soon, thanks a lot....:)

CFileDialog dlg(TRUE, _T("*.bmp"), "",OFN_FILEMUSTEXIST|OFN_PATHMUSTEXIST|OFN_HIDEREA DONLY,
"Image Files (*.bmp; *.jpg) |*.bmp;*.jpg|All Files (*.*)|*.*||",NULL);

  char title[]= {"Open Image"};

  dlg.m_ofn.lpstrTitle= title;

  if (dlg.DoModal() == IDOK) {

    CString path= dlg.GetPathName(); // contain the // selected filename

    //load & display image
    img = cvvLoadImage(path);

    cvvShowImage("Original Image",img);
    cvvShowImage("Image Processing",img);

  }

__________________
ck.
Reply With Quote