filters

kis_tiff_writer_visitor.h

00001 /*
00002  *  Copyright (c) 2006 Cyrille Berger <cberger@cberger.net>
00003  *
00004  *  This program is free software; you can redistribute it and/or modify
00005  *  it under the terms of the GNU General Public License as published by
00006  *  the Free Software Foundation; either version 2 of the License, or
00007  *  (at your option) any later version.
00008  *
00009  *  This program is distributed in the hope that it will be useful,
00010  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012  *  GNU General Public License for more details.
00013  *
00014  *  You should have received a copy of the GNU General Public License
00015  *  along with this program; if not, write to the Free Software
00016  *  Foundation, Inc., 51 Franklin Street, Fifth Floor,
00017  * Boston, MA 02110-1301, USA.
00018  */
00019 
00020 #ifndef KIS_TIFF_WRITER_VISITOR_H
00021 #define KIS_TIFF_WRITER_VISITOR_H
00022 
00023 #include <kis_layer_visitor.h>
00024 
00025 #include <kis_iterators_pixel.h>
00026 
00027 #include <tiffio.h>
00028 
00029 class KisTIFFOptions;
00030 
00034 class KisTIFFWriterVisitor : public KisLayerVisitor
00035 {
00036     public:
00037         KisTIFFWriterVisitor(TIFF*img, KisTIFFOptions* options);
00038         ~KisTIFFWriterVisitor();
00039     public:
00040         virtual bool visit(KisPaintLayer *layer);
00041         virtual bool visit(KisGroupLayer *layer);
00042         virtual bool visit(KisPartLayer *layer);
00043         virtual bool visit(KisAdjustmentLayer* ) { return true; }
00044     private:
00045         inline TIFF* image() { return m_image; }
00046         inline bool saveAlpha();
00047         bool copyDataToStrips( KisHLineIterator it, tdata_t buff, uint8 depth, uint8 nbcolorssamples, Q_UINT8* poses);
00048     private:
00049         TIFF* m_image;
00050         KisTIFFOptions* m_options;
00051 };
00052 
00053 #endif
KDE Home | KDE Accessibility Home | Description of Access Keys