Back to index

scribus-ng  1.3.4.dfsg+svn20071115
scimgdataloader_jpeg.h
Go to the documentation of this file.
00001 /*
00002 For general Scribus (>=1.3.2) copyright and licensing information please refer
00003 to the COPYING file provided with the program. Following this notice may exist
00004 a copyright and/or license notice that predates the release of Scribus 1.3.2
00005 for which a new license (GPL+exception) is in place.
00006 */
00007 #ifndef SCIMGDATALOADER_JPEG_H
00008 #define SCIMGDATALOADER_JPEG_H
00009 
00010 #include "scimgdataloader.h"
00011 
00012 extern "C"
00013 {
00014 #define XMD_H           // shut JPEGlib up
00015 #if defined(Q_OS_UNIXWARE)
00016 #  define HAVE_BOOLEAN  // libjpeg under Unixware seems to need this
00017 #endif
00018 #include <jpeglib.h>
00019 #include <jerror.h>
00020 #undef HAVE_STDLIB_H
00021 #ifdef const
00022 #  undef const          // remove crazy C hackery in jconfig.h
00023 #endif
00024 }
00025 
00026 class ScImgDataLoader_JPEG : public ScImgDataLoader
00027 {
00028 protected:
00029 
00030        void initSupportedFormatList();
00031 
00032        bool marker_is_icc (jpeg_saved_marker_ptr marker);
00033        bool marker_is_photoshop (jpeg_saved_marker_ptr marker);
00034        bool read_jpeg_marker (UINT8 requestmarker, j_decompress_ptr cinfo, JOCTET **icc_data_ptr, unsigned int *icc_data_len);
00035 
00036 public:
00037        ScImgDataLoader_JPEG(void);
00038 
00039        virtual void preloadAlphaChannel(const QString& fn, int res);
00040        virtual void loadEmbeddedProfile(const QString& fn);
00041        virtual bool loadPicture(const QString& fn, int res, bool thumbnail);
00042 };
00043 
00044 #endif