Skip to content

Commit

Permalink
Stop a command line message from tiff16 source.
Browse files Browse the repository at this point in the history
Don't check to see if a file is actually a tiff file
unless the filename extention suggests that it is
(ie, unless it ends with caseInsensitive(tiff or tif).
  • Loading branch information
netterfield committed Nov 11, 2015
1 parent 817a739 commit 9dce8ac
Showing 1 changed file with 11 additions and 12 deletions.
23 changes: 11 additions & 12 deletions src/datasources/tiff16source/tiff16source.cpp
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

0 comments on commit 9dce8ac

Please sign in to comment.