00001 /*======================================================================= 00002 *** THE CONTENT OF THIS WORK IS PROPRIETARY TO FEI S.A.S, (FEI S.A.S.), *** 00003 *** AND IS DISTRIBUTED UNDER A LICENSE AGREEMENT. *** 00004 *** *** 00005 *** REPRODUCTION, DISCLOSURE, OR USE, IN WHOLE OR IN PART, OTHER THAN AS *** 00006 *** SPECIFIED IN THE LICENSE ARE NOT TO BE UNDERTAKEN EXCEPT WITH PRIOR *** 00007 *** WRITTEN AUTHORIZATION OF FEI S.A.S. *** 00008 *** *** 00009 *** RESTRICTED RIGHTS LEGEND *** 00010 *** USE, DUPLICATION, OR DISCLOSURE BY THE GOVERNMENT OF THE CONTENT OF THIS *** 00011 *** WORK OR RELATED DOCUMENTATION IS SUBJECT TO RESTRICTIONS AS SET FORTH IN *** 00012 *** SUBPARAGRAPH (C)(1) OF THE COMMERCIAL COMPUTER SOFTWARE RESTRICTED RIGHT *** 00013 *** CLAUSE AT FAR 52.227-19 OR SUBPARAGRAPH (C)(1)(II) OF THE RIGHTS IN *** 00014 *** TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 52.227-7013. *** 00015 *** *** 00016 *** COPYRIGHT (C) 1996-2014 BY FEI S.A.S, *** 00017 *** BORDEAUX, FRANCE *** 00018 *** ALL RIGHTS RESERVED *** 00019 **=======================================================================*/ 00020 /*======================================================================= 00021 ** Author : C. OGNIER (Jun 2003) 00022 **=======================================================================*/ 00023 00024 #ifndef _SOBMPIMAGERW_ 00025 #define _SOBMPIMAGERW_ 00026 00027 #include <Inventor/image/SoRasterImageRW.h> 00028 00029 SO_PIMPL_PUBLIC_DECLARATION(SoBMPImageRW); 00030 00050 class SoBMPImageRW : public SoRasterImageRW { 00051 00052 SO_IMAGE_RASTER_RW_HEADER() 00053 SO_PIMPL_PUBLIC_HEADER(SoBMPImageRW); 00054 00055 public: 00056 00060 SoBMPImageRW(); 00061 00065 virtual ~SoBMPImageRW(); 00066 00070 virtual SbBool open(SoRasterImageIO* rasterImageIO, OpenMode SO_UNUSED_PARAM(openMode)); 00075 virtual void close(); 00076 00080 virtual SbBool write(SbRasterImage* SO_UNUSED_PARAM(rasterImage), unsigned int SO_UNUSED_PARAM(xPos) = 0, unsigned int SO_UNUSED_PARAM(yPos) = 0); 00081 00085 virtual SbBool writeFooter(); 00086 00092 virtual SbBool read(SbRasterImage* SO_UNUSED_PARAM(rasterImage), SbBool SO_UNUSED_PARAM(infoOnly) = FALSE); 00093 00099 virtual SbBool isMultipleBufferInverted() const; 00104 virtual SoRasterImageRW::WriteCapability getWriteCapability() const; 00105 00109 virtual SoRasterImageRW::ReadCapability getReadCapability() const; 00110 00111 private: 00112 static SbBool checkWriteFormatAbility( SbRasterImage::Components _comp ); 00113 00114 private: 00115 virtual void createSuffixList(); 00116 00117 private: 00118 SbBool writeImage(SbRasterImage* rasterImage); 00119 SbBool writeMultipleImages(SbRasterImage* SO_UNUSED_PARAM(rasterImage), unsigned int SO_UNUSED_PARAM(xPos) = 0, unsigned int SO_UNUSED_PARAM(yPos) = 0); 00120 00121 #if defined(_WIN32) 00122 SbBool internalBitmapReader( SbRasterImage* rasterImage, const SbString& fname, SbBool infoOnly = FALSE ); 00123 #endif 00124 00125 unsigned char* m_imageBuffer; 00126 SbBool m_writeMode; 00127 00128 }; 00129 00130 #endif 00131