解决方案 »

  1.   

    直接用CImage::Load()/Draw()好了,获取路径,然后在View类的OnDraw函数中调用CImage::Draw()贴图即可。
      

  2.   


    谢谢~我现在就在配置Cximage~
    |- C/C++
    Code Generation
    |- Use run-time library : Multithreaded DLL (must be the same for | all the linked libraries) //应该只要是多线程DLL即可,DEBUG的也行
    |- Struct member alignment : must be the same for all the linked libraries|- Precompiled headers : not using precompiled headers
    |- Preprocessor
    |- Additional Include Directories: ..\cximage这什么意思啊~在工程里根本找不到啊
      

  3.   

    如果你只需要加载本地图片的话,
    点击资源视图,右键项目,添加资源,点击bitmap,导入需要的图
    不过貌似BMP格式的方便些,在属性中有IDB, //从外部加载BMP图
    CBitmap bitmap;
    bitmap.LoadBitmap(IDB_BITMAP11);
    CDC *pDc = GetDC();
    CDC memDC;
    memDC.CreateCompatibleDC(pDc);
    memDC.SelectObject(&bitmap);
    BITMAP bmp;
    bitmap.GetBitmap(&bmp);
    CRect rect;
    GetClientRect(&rect);
    pDc->StretchBlt(0,0,rect.Width(),rect.Height(),&memDC,0,0,bmp.bmWidth,bmp.bmHeight,SRCCOPY);
    memDC.DeleteDC();
    ::DeleteObject(&bitmap);
      

  4.   

    如果你是用的CImage类来处理图像的话,那直接在save的时候输入好对应的图像格式就能自动转换了,至于选择文件窗口,那个网上多的是,显示的部分参考这里:http://blog.csdn.net/xianglifighter/article/details/34840207
      

  5.   

    1.点一下浏览就能选择本地图片----->这个你可以用CFileDialog,详细使用方法自己查一下。
    2.Cimage将JPG转换成BMP然后在把BMP转为JPG输出图片------->这个用CImage的load和Save方法就能实现,load一个jpg图片,save成bmp图片。
      

  6.   

    #include <atlimage.h>
    CImage m_img;