#include "imageconverter.h"

ImageConverter::ImageConverter(QObject *parent) : QObject(parent) {

}

void ImageConverter::convertImage(QString pnmpath, QString jpgpath)
{
    char *exec_argv[5];
    exec_argv[0] = "gm";
    exec_argv[1] = "convert";
    exec_argv[2] = pnmpath.toUtf8().data();
    exec_argv[3] = jpgpath.toUtf8().data();
    exec_argv[4] = NULL;

    qDebug()<< "start";
    qDebug() << "图片转换结果：" << GMCommand(4,exec_argv);
    qDebug()<< "finish";
}
