Skip to content

Commit

Permalink
Added tiff support to edit
Browse files Browse the repository at this point in the history
  • Loading branch information
RussellGarwood committed Feb 1, 2020
1 parent ac21b56 commit 3c01ff2
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
3 changes: 3 additions & 0 deletions SPIERSedit/src/copyingimpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -714,6 +714,9 @@ void CopyingImpl::CompressAllSourceFiles(int level)

bool GSflag = false;
image.load(FullFiles[0]);

image.load(FullFiles[0]);

if (image.allGray() && image.format() != QImage::Format_Indexed8)
if (QMessageBox::question(this, "Convert to Greyscale?",
"The first image at least appears to be a greyscale image saved as colour.\nDo you want to convert all images to greyscale? This slow the conversion process, but will save space and increase performance.\nClick 'Yes' if you want to convert all images to greyscale, or 'No' to proceed as normal.\n"
Expand Down
9 changes: 7 additions & 2 deletions SPIERSedit/src/mainwindowimpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
#include <QFileInfo>
#include <QMutexLocker>
#include <QTextStream>
#include <QStandardPaths>

bool temptestflag = false;

Expand Down Expand Up @@ -1280,11 +1281,15 @@ void MainWindowImpl::Menu_File_New() //create from scratch
QStringList files = QFileDialog::getOpenFileNames(
nullptr,
"Select source images for dataset",
"D:\\Research\\3dFiles\\Grinding\\Acaen\\5-2\\Test",
"Images (*.png *.jpg *.jpeg *.bmp)");
QString(QStandardPaths::DesktopLocation),
"Images (*.png *.jpg *.jpeg *.bmp *.tif *.tiff)");

qSort(files.begin(), files.end());

if (files[0].endsWith(".tif")
|| files[0].endsWith(".tiff"))
Message("Tiff support is a relatively recent addition to SPIERSedit, and has not been extensively tested. Please can you submit an issue on the Palaeoware SPIERS GitHub repository should you encounter any issues.");

//Now we do a whole load of initialisation!
if (files.count() == 0) return; //if nothing there, cancel

Expand Down
2 changes: 1 addition & 1 deletion SPIERSview/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ int main(int argc, char *argv[])
splash->show();
splash->showMessage("<font><b>" + QString(PRODUCTNAME) + " v" + QString(SOFTWARE_VERSION) + " </b></font>", Qt::AlignHCenter, Qt::white);
app.processEvents();
QTimer::singleShot(3000, splash, SLOT(close()));
QTimer::singleShot(2000, splash, SLOT(close()));

app.setQuitOnLastWindowClosed(true);

Expand Down

0 comments on commit 3c01ff2

Please sign in to comment.