如题,利用GDI+ 画出一幅图像并保存了,如何才能在此保存的图片的基础上继续画图呢,请高手不吝赐教!eg:  draw1()
    {
           Bitmap bitmap(Width,Height);
  Graphics graphics(&bitmap);
                 .............
           bitmap.Save(L"test.bmp", &Clsid,NULL);
     }    draw2()
     {
           Bitmap bitmap(Width,Height);
  Graphics graphics(&bitmap);
                 .............
           bitmap.Save(L"test.bmp", &Clsid,NULL);
     }
 如上 draw1(),draw2()为分别绘图并分别保存的图片,我现在想实现的结果是如何把draw2()方法里绘图结果添加到draw1()方法保存的图片上!

解决方案 »

  1.   

    是不是相当于photoshop里面层的概念,重新打开的时候,可以继续在各个层上编辑图片。
      

  2.   

    Graphics graphics有DrawImage的方法的。
      

  3.   

    Graphics对象初始化时,会传递一个绑定的对象
    可以是HWND,HCD,而且也可以是一个Bitmap,
    先用一个Bitmap打开你Dra
      

  4.   

    用一个Bitmap打开draw1()方法保存的图片
    然后绑定一个Graphics
    然后这个Graphics所有的绘制动作都是在Bitmap上了
      

  5.   

    Bitmap bit(L"陈老师作品集.bmp");
    Graphics gra(&bit);
    gra.drawline(xxxx);
    这就是想当于在陈老师的作品中画线
      

  6.   


    在我的例子中是不是可以这样理解调用的哈:draw1()
      {
      Bitmap bitmap(Width,Height);
    Graphics graphics(&bitmap);
      .............
      bitmap.Save(L"test.bmp", &Clsid,NULL);
      }  draw2()
      {
      Bitmap bitmap(L"test.bmp");
    Graphics graphics(&bitmap);
      .............
      bitmap.Save(L"test.bmp", &Clsid,NULL);
      }