Showing with 11 additions and 30 deletions.
  1. +11 −12 src/datasources/tiff16source/tiff16source.cpp
  2. +0 −18 src/widgets/datarange.ui
23 changes: 11 additions & 12 deletions src/datasources/tiff16source/tiff16source.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -507,22 +507,21 @@ int Tiff16SourcePlugin::understands(QSettings *cfg, const QString& filename) con

quint16 spp, bpp, is_tiled;

TIFF *tif=TIFFOpen(filename.toAscii(), "r");
if (filename.toLower().endsWith(".tiff") ||
filename.toLower().endsWith(".tif")) {

if (tif) {
TIFFGetField(tif, TIFFTAG_BITSPERSAMPLE, &bpp);
TIFFGetField(tif, TIFFTAG_SAMPLESPERPIXEL, &spp);
is_tiled = TIFFIsTiled(tif);
TIFF *tif=TIFFOpen(filename.toAscii(), "r");

if (tif) {
TIFFGetField(tif, TIFFTAG_BITSPERSAMPLE, &bpp);
TIFFGetField(tif, TIFFTAG_SAMPLESPERPIXEL, &spp);
is_tiled = TIFFIsTiled(tif);

TIFFClose(tif);
TIFFClose(tif);


if ((bpp == 16) && (spp = 1) && (is_tiled == 0)) {
if (filename.toLower().endsWith(".tiff") ||
filename.toLower().endsWith(".tif")) {
return 91;
} else {
return 50;
if ((bpp == 16) && (spp = 1) && (is_tiled == 0)) {
return 91;
}
}
}
Expand Down
18 changes: 0 additions & 18 deletions src/widgets/datarange.ui
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,6 @@
<property name="enabled">
<bool>false</bool>
</property>
<property name="toolTip">
<string>Input a number (starting from 0 for the first value), or the format [[[[YYYY:]MM:]DD:]HH:]MM[.SS] for dates.</string>
</property>
<property name="whatsThis">
<string>The index of the first data read. For ASCII files, this is the data row number in the file. For frame based files, this is the first frame.</string>
</property>
<property name="text">
<string>0</string>
</property>
Expand Down Expand Up @@ -136,12 +130,6 @@
<property name="enabled">
<bool>false</bool>
</property>
<property name="toolTip">
<string>Input a number (starting from 0 for the first value), or the format [[[[YYYY:]MM:]DD:]HH:]MM[.SS] for dates.</string>
</property>
<property name="whatsThis">
<string>The amount of data to read into the vector. For ASCII files, this is the number of data rows. For frame files there may be more than one sample per frame. Dates are input in the format [[[[YYYY:]MM:]DD:]HH:]MM[.SS].</string>
</property>
</widget>
</item>
<item row="0" column="4">
Expand Down Expand Up @@ -249,12 +237,6 @@
</item>
<item row="0" column="1">
<widget class="QLineEdit" name="_start">
<property name="toolTip">
<string>Input a number (starting from 0 for the first value), or the format [[[[YYYY:]MM:]DD:]HH:]MM[.SS] for dates.</string>
</property>
<property name="whatsThis">
<string>The index of the first data read. For ASCII files, this is the data row number in the file. For frame based files, this is the first frame.</string>
</property>
<property name="text">
<string>0</string>
</property>
Expand Down