在windows下vc++6.0中实现图片加载,放大功能。 
图片有可能是jpg格式,放在本地计算机上。根据路径。

解决方案 »

  1.   

    用GDI+ 最simplegoogle GDI+
      

  2.   

    加载使用
    atlimage.h?vc6.0不支持阿,怎么添加。把你的 发来,给分。
      

  3.   

    放大的话,现在基本都是线性插值;如果你对图像处理不熟的话,用第三方库吧,CXimage应该有这个功能的
      

  4.   

    VC 6.0下GDI+ 配置 http://www.cnblogs.com/DavidHu/archive/2009/01/06/1191635.html下载一个GDI+的包 程序发布的时候 最多就是带上一个DLL。
      

  5.   

    谢谢大家!!!正在做,基本的 已经实现。但是我想在扩大时能够更清晰。就是插值。正在想,谢谢大家。不知道GDI+可不可以,若可以,简单吗?请教中
    谢谢大家
      

  6.   


    void CTestGdi2Dlg::OnButton1() 
    {
    // TODO: Add your control notification handler code here

    HDC hdc;

    Graphics graphics(hdc);//不知道怎么 用graphics
    Image image(L"110.jpg");
    Status status = image.GetLastStatus();
        if(Ok != status)
    {
    MessageBox("错误status");
    return ;
    } UINT width1 = image.GetWidth();
    UINT height = image.GetHeight();
    // Make the destination rectangle 30 percent wider and
    // 30 percent taller than the original image.
    // Put the upper-left corner of the destination
    // rectangle at (150, 20).
    Rect destinationRect(150, 20, 1.3 * width1, 1.3 * height);
    // Draw the image unaltered with its upper-left corner at (0, 0).
    status = graphics.DrawImage(&image, 0, 0);
    if(Ok != status)
    {
    MessageBox("错误status"); return ;
    }
    // Draw a portion of the image. Scale that portion of the image
    // so that it fills the destination rectangle.
    status = graphics.DrawImage(
       &image,
       destinationRect,
       0, 0,              // upper-left corner of source rectangle
       0.75 * width1,      // width of source rectangle
       0.75 * height,     // height of source rectangle
       UnitPixel);
    if(Ok != status)
    {
    MessageBox("错误status");
    return ;
    }
    }那位大虾给改下,有好多问题。谢谢