1
0
Fork 0
mirror of https://gitlab.com/Syping/gta5view-cmd synced 2024-11-21 13:10:23 +01:00

add autodef autoext for jpg convert

This commit is contained in:
Syping 2017-10-11 11:38:16 +02:00
parent e3e56955e0
commit c474dcfd54

View file

@ -49,9 +49,12 @@ int main(int argc, char *argv[])
SnapmaticPicture picture(args.at(1));
if (picture.readingPicture(true, false, true))
{
if (!picture.exportPicture(args.at(2), SnapmaticFormat::JPEG_Format))
QString filePath = args.at(2);
filePath.replace("<autodef>", picture.getExportPictureFileName());
filePath.replace("<autoext>", ".jpg");
if (!picture.exportPicture(filePath, SnapmaticFormat::JPEG_Format))
{
cout << "gta5view-cmd: Exporting of " << args.at(1).toStdString().c_str() << " to " << args.at(2).toStdString().c_str() << " failed!" << endl;
cout << "gta5view-cmd: Exporting of " << args.at(1).toStdString().c_str() << " to " << filePath.toStdString().c_str() << " failed!" << endl;
return 1;
}
}