1 /* SPDX-FileCopyrightText: 2003-2019 The KPhotoAlbum Development Team 2 3 SPDX-License-Identifier: GPL-2.0-or-later 4 */ 5 #ifndef RAWIMAGEDECODER_H 6 #define RAWIMAGEDECODER_H 7 8 #include "ImageDecoder.h" 9 10 #include <kpabase/FileName.h> 11 12 #include <QStringList> 13 14 namespace ImageManager 15 { 16 17 class RAWImageDecoder : public ImageDecoder 18 { 19 public: 20 /** 21 * @brief fileCanBeSkipped determines whether the file is of interest to KPhotoAlbum or not. 22 * It takes into account known skippable suffixes (e.g. thumbnail files) and the 23 * configuration on when to skip raw files (i.e. `skipRawIfOtherMatches`). 24 * 25 * @param loadedFiles a set of file names that are already loaded. 26 * @param imageFile the image file 27 * @return \c true, if the file can be skipped, \c false otherwise. 28 */ 29 bool fileCanBeSkipped(const DB::FileNameSet &loadedFiles, const DB::FileName &imageFile) const; 30 static bool isRAW(const DB::FileName &imageFile); 31 static QStringList rawExtensions(); 32 33 protected: 34 bool _decode(QImage *img, ImageRequest *request, QSize *fullSize, int dim = -1) override; 35 bool _mightDecode(const DB::FileName &imageFile) override; 36 }; 37 } 38 39 #endif /* RAWIMAGEDECODER_H */ 40 // vi:expandtab:tabstop=4 shiftwidth=4: 41