| VRS - The Virtual Rendering System |
| version 3.3 |
00001 /****************************************************************************** 00002 * VRS - The Virtual Rendering System 00003 * Copyright (C) 2000-2004 Computer Graphics Systems Group at the 00004 * Hasso-Plattner-Institute (HPI), Potsdam, Germany. 00005 * 00006 * This library is free software; you can redistribute it and/or modify it 00007 * under the terms of the GNU Lesser General Public License as published by 00008 * the Free Software Foundation; either version 2.1 of the License, or (at 00009 * your option) any later version. This library is distributed in the hope 00010 * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied 00011 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 * GNU Lesser General Public License for more details. You should have received 00013 * a copy of the GNU Lesser+ General Public License along with this library; if 00014 * not, write to the FreeSoftware Foundation, Inc., 59 Temple Place, Suite 330, 00015 * Boston, MA, 02111-1307, USA. 00016 ******************************************************************************/ 00017 00018 // $Id: pngwriter.h 6014 2007-08-09 07:51:16Z Konstantin_Baumann $ 00019 // 00020 // $Log$ 00021 // Revision 1.8 2005/03/29 11:12:30 baumann 00022 // new method writeToMemory() added 00023 // 00024 // Revision 1.7 2005/01/03 06:20:49 baumann 00025 // addd new method writeToMemory() 00026 // 00027 // Revision 1.5 2004/11/03 11:56:57 saar 00028 // Class comment changed (Doxygen style) 00029 // 00030 // Revision 1.4 2004/03/12 16:28:40 baumann 00031 // macros VRS_NAMESPACE_BEGIN/_END expanded and removed 00032 // 00033 // Revision 1.3 2003/12/07 10:37:58 kirsch 00034 // added qualified namespace of std::string 00035 // 00036 // Revision 1.2 2003/11/07 14:19:25 kirsch 00037 // removed leading underscore from include guards 00038 // 00039 // Revision 1.1 2002/09/16 10:22:21 baumann 00040 // libpng added 00041 // 00042 00043 #ifndef VRS_IO_PNGWRITER_H_ 00044 #define VRS_IO_PNGWRITER_H_ 00045 00046 #include <vrs/io/objectwriter.h> 00047 00048 namespace VRS { 00049 00050 class DataResource; 00051 class Image; 00052 00054 class VRS_CORE_API PNGWriter : public ObjectWriter { 00055 public: 00056 virtual bool canHandle(SharedObj* obj) const; 00057 virtual void write(SharedObj* obj, const std::string& filename) const; 00058 virtual SO<DataResource> writeToMemory(SO<SharedObj> obj) const; 00059 00060 virtual const char* objectFormatName() const; 00061 virtual const char* objectFileSuffix() const; 00063 00064 static void writeFile(SO<Image> image, const std::string& filename); 00066 00067 static SO<DataResource> writeToMemory(SO<Image> image); 00069 00070 VRS_TYPEINFO(PNGWriter, ObjectWriter); 00071 }; // class PNGWriter 00072 00073 } // namespace VRS 00074 00075 #endif // VRS_IO_PNGWRITER_H_