tiff图片直接拷贝
This commit is contained in:
parent
d78bc38a27
commit
618dcec52c
|
|
@ -2543,6 +2543,14 @@ bool MainWindowCurve::saveMultipageTiff(const QList<QImage> images, const QStrin
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void copyFile(const QString &sourcePath, const QString &destinationPath) {
|
||||||
|
if (QFile::copy(sourcePath, destinationPath)) {
|
||||||
|
qDebug() << "文件拷贝成功!";
|
||||||
|
} else {
|
||||||
|
qDebug() << "文件拷贝失败!";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//isbmp=0 to printer or pdf
|
//isbmp=0 to printer or pdf
|
||||||
// =1 to printer by use image
|
// =1 to printer by use image
|
||||||
// =2 to tif by created this soft
|
// =2 to tif by created this soft
|
||||||
|
|
@ -2912,6 +2920,14 @@ void MainWindowCurve::_slotExport(QPrinter &printer, int IsBmp, QString pngName,
|
||||||
saveMultipageTiff(images, filename); // 合并、保存为TIFF文件
|
saveMultipageTiff(images, filename); // 合并、保存为TIFF文件
|
||||||
// writeTiff(images[0], filename);//测试单个文件
|
// writeTiff(images[0], filename);//测试单个文件
|
||||||
|
|
||||||
|
if(pngName.contains(".tif"))
|
||||||
|
{
|
||||||
|
copyFile(filename, pngName);
|
||||||
|
//删除 tiff 中间文件
|
||||||
|
QDir ss(filename);
|
||||||
|
ss.remove(filename);
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
QImage img1(filename);
|
QImage img1(filename);
|
||||||
if(!img1.isNull())
|
if(!img1.isNull())
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user