File indexing completed on 2024-05-05 16:28:10
0001 /* SPDX-FileCopyrightText: 2003-2019 The KPhotoAlbum Development Team 0002 0003 SPDX-License-Identifier: GPL-2.0-or-later 0004 */ 0005 #ifndef IMAGEDECODER_H 0006 #define IMAGEDECODER_H 0007 0008 #include <QList> 0009 0010 class QSize; 0011 class QImage; 0012 0013 namespace DB 0014 { 0015 class FileName; 0016 } 0017 0018 namespace ImageManager 0019 { 0020 class ImageRequest; 0021 class ImageDecoder 0022 { 0023 public: 0024 static bool decode(QImage *img, ImageRequest *request, QSize *fullSize, int dim = -1); 0025 static bool mightDecode(const DB::FileName &imageFile); 0026 0027 virtual ~ImageDecoder(); 0028 0029 protected: 0030 ImageDecoder(); 0031 virtual bool _decode(QImage *img, ImageRequest *request, QSize *fullSize, int dim = -1) = 0; 0032 virtual bool _mightDecode(const DB::FileName &imageFile) = 0; 0033 0034 private: 0035 static QList<ImageDecoder *> *decoders(); 0036 }; 0037 } 0038 0039 #endif /* IMAGEDECODER_H */ 0040 0041 // vi:expandtab:tabstop=4 shiftwidth=4: