当前位置: 代码迷 >> QT开发 >> 图片合成 C/C++ QT,该如何解决
  详细解决方案

图片合成 C/C++ QT,该如何解决

热度:142   发布时间:2016-04-25 03:09:26.0
图片合成 C/C++ QT
bool MixPicture(char* path1, char* path2, int left,
                int top, int right, int bottom, char* resultpath)
{
}

将path2 图片在指定位置合成到path1图片上,保存到resultpath里



高分求实现功能
------解决思路----------------------

void MixPicture(QString source, QString tmpFile, int left, int top, int width, int hight, QString strPath)
{
    QPixmap pix(source);
    QPixmap tmp(tmpFile);
    QPainter paint(&pix);
    paint.drawPixmap(left,top,width,hight,tmp);

    pix.save(strPath,"jpg");
}

------解决思路----------------------
这么强大,这种方法可以吗?
  相关解决方案