src/plugins/imageformats/tiff/qtiffhandler.cpp
changeset 30 5dc02b23752f
parent 18 2f34d5167611
equal deleted inserted replaced
29:b72c6db6890b 30:5dc02b23752f
   383     if (colorTable.size() != 256)
   383     if (colorTable.size() != 256)
   384         return false;
   384         return false;
   385 
   385 
   386     const bool increasing = (colorTable.at(0) == 0xff000000);
   386     const bool increasing = (colorTable.at(0) == 0xff000000);
   387     for (int i = 0; i < 256; ++i) {
   387     for (int i = 0; i < 256; ++i) {
   388         if (increasing && colorTable.at(i) != qRgb(i, i, i)
   388         if ((increasing && colorTable.at(i) != qRgb(i, i, i))
   389             || !increasing && colorTable.at(i) != qRgb(255 - i, 255 - i, 255 - i))
   389             || (!increasing && colorTable.at(i) != qRgb(255 - i, 255 - i, 255 - i)))
   390             return false;
   390             return false;
   391     }
   391     }
   392     return true;
   392     return true;
   393 }
   393 }
   394 
   394