"Fossies" - the Fresh Open Source Software Archive 
As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style:
standard) with prefixed line numbers and
code folding option.
Alternatively you can here
view or
download the uninterpreted source code file.
For more information about "imageloaderfreeimage.h" see the
Fossies "Dox" file reference documentation.
1 /*
2 PosteRazor - Make your own poster!
3 Copyright (C) 2005-2008 by Alessandro Portale
4 http://posterazor.sourceforge.net/
5
6 This file is part of PosteRazor
7
8 PosteRazor is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation, either version 3 of the License, or
11 (at your option) any later version.
12
13 PosteRazor is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with PosteRazor; if not, write to the Free Software
20 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
21 */
22
23 #ifndef IMAGELOADERFREEIMAGE_H
24 #define IMAGELOADERFREEIMAGE_H
25
26 #include "imageloaderinterface.h"
27
28 struct FIBITMAP;
29
30 class ImageLoaderFreeImage: public QObject, public ImageLoaderInterface
31 {
32 public:
33 ImageLoaderFreeImage(QObject *parent = 0);
34 ~ImageLoaderFreeImage();
35
36 bool loadInputImage(const QString &imageFileName, QString &errorMessage);
37 bool isImageLoaded() const;
38 bool isJpeg() const;
39 QString fileName() const;
40 QSize sizePixels() const;
41 double horizontalDotsPerUnitOfLength(Types::UnitsOfLength unit) const;
42 double verticalDotsPerUnitOfLength(Types::UnitsOfLength unit) const;
43 QSizeF size(Types::UnitsOfLength unit) const;
44 const QImage imageAsRGB(const QSize &size) const;
45 int bitsPerPixel() const;
46 Types::ColorTypes colorDataType() const;
47 const QByteArray bits() const;
48 const QVector<QRgb> colorTable() const;
49 const QVector<QPair<QStringList, QString> > &imageFormats() const;
50 QString libraryName() const;
51 QString libraryAboutText() const;
52
53 private:
54 FIBITMAP* m_bitmap;
55 int m_widthPixels;
56 int m_heightPixels;
57 unsigned int m_horizontalDotsPerMeter;
58 unsigned int m_verticalDotsPerMeter;
59 QString m_imageFileName;
60
61 void disposeImage();
62 static bool hasFreeImageVersionCorrectTopDownInConvertBits();
63 };
64
65 #endif // IMAGELOADERFREEIMAGE_H