Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:04:05

0001 // Created on: 2012-07-18
0002 // Created by: Kirill GAVRILOV
0003 // Copyright (c) 2012-2014 OPEN CASCADE SAS
0004 //
0005 // This file is part of Open CASCADE Technology software library.
0006 //
0007 // This library is free software; you can redistribute it and/or modify it under
0008 // the terms of the GNU Lesser General Public License version 2.1 as published
0009 // by the Free Software Foundation, with special exception defined in the file
0010 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0011 // distribution for complete text of the license and disclaimer of any warranty.
0012 //
0013 // Alternatively, this file may be used under the terms of Open CASCADE
0014 // commercial license or contractual agreement.
0015 
0016 #ifndef Image_PixMap_HeaderFile
0017 #define Image_PixMap_HeaderFile
0018 
0019 #include <Image_CompressedFormat.hxx>
0020 #include <Image_PixMapData.hxx>
0021 #include <Standard_Transient.hxx>
0022 #include <Quantity_ColorRGBA.hxx>
0023 
0024 //! Class represents packed image plane.
0025 class Image_PixMap : public Standard_Transient
0026 {
0027   DEFINE_STANDARD_RTTIEXT(Image_PixMap, Standard_Transient)
0028 public:
0029 
0030   //! Determine Big-Endian at runtime
0031   static inline bool IsBigEndianHost()
0032   {
0033     union { int myInt; char myChar[sizeof(int)]; } aUnion;
0034     aUnion.myInt = 1;
0035     return !aUnion.myChar[0];
0036   }
0037 
0038   //! Return bytes reserved for one pixel (may include extra bytes for alignment).
0039   Standard_EXPORT static Standard_Size SizePixelBytes (const Image_Format thePixelFormat);
0040 
0041   //! Auxiliary method for swapping bytes between RGB and BGR formats.
0042   //! This method modifies the image data but does not change pixel format!
0043   //! Method will fail if pixel format is not one of the following:
0044   //!  - Image_Format_RGB32 / Image_Format_BGR32
0045   //!  - Image_Format_RGBA  / Image_Format_BGRA
0046   //!  - Image_Format_RGB   / Image_Format_BGR
0047   //!  - Image_Format_RGBF  / Image_Format_BGRF
0048   //!  - Image_Format_RGBAF / Image_Format_BGRAF
0049   Standard_EXPORT static bool SwapRgbaBgra (Image_PixMap& theImage);
0050 
0051   //! Convert image to Black/White.
0052   Standard_EXPORT static void ToBlackWhite (Image_PixMap& theImage);
0053 
0054   //! Reverse line order as it draws it from bottom to top.
0055   Standard_EXPORT static bool FlipY (Image_PixMap& theImage);
0056 
0057   //! Return default image data allocator.
0058   Standard_EXPORT static const Handle(NCollection_BaseAllocator)& DefaultAllocator();
0059 
0060   //! Return string representation of pixel format.
0061   Standard_EXPORT static Standard_CString ImageFormatToString (Image_Format theFormat);
0062 
0063   //! Return string representation of compressed pixel format.
0064   Standard_EXPORT static Standard_CString ImageFormatToString (Image_CompressedFormat theFormat);
0065 
0066   //! Convert raw pixel value into Quantity_ColorRGBA. This function is relatively slow.
0067   //! @param[in] theRawValue pointer to pixel definition
0068   //! @param[in] theFormat pixel format
0069   //! @param[in] theToLinearize when TRUE, the color stored in non-linear color space (e.g. Image_Format_RGB) will be linearized
0070   //! @return the pixel color
0071   Standard_EXPORT static Quantity_ColorRGBA ColorFromRawPixel (const Standard_Byte* theRawValue,
0072                                                                const Image_Format theFormat,
0073                                                                const Standard_Boolean theToLinearize = false);
0074 
0075   //! Set raw pixel value from Quantity_ColorRGBA. This function is relatively slow.
0076   //! @param[out] theRawValue pointer to pixel definition to modify
0077   //! @param[in]  theFormat pixel format
0078   //! @param[in]  theColor color value to convert from
0079   //! @param[in] theToDeLinearize when TRUE, the gamma correction will be applied for storing in non-linear color space (e.g. Image_Format_RGB)
0080   Standard_EXPORT static void ColorToRawPixel (Standard_Byte* theRawValue,
0081                                                const Image_Format theFormat,
0082                                                const Quantity_ColorRGBA& theColor,
0083                                                const Standard_Boolean theToDeLinearize = false);
0084 
0085 public: // high-level API
0086 
0087   //! Return pixel format.
0088   Image_Format Format() const { return myImgFormat; }
0089 
0090   //! Override pixel format specified by InitXXX() methods.
0091   //! Will throw exception if pixel size of new format is not equal to currently initialized format.
0092   //! Intended to switch formats indicating different interpretation of the same data
0093   //! (e.g. ImgGray and ImgAlpha).
0094   Standard_EXPORT void SetFormat (const Image_Format thePixelFormat);
0095 
0096   //! Return image width in pixels.
0097   Standard_Size Width() const { return myData.SizeX; }
0098 
0099   //! Return image height in pixels.
0100   Standard_Size Height() const { return myData.SizeY; }
0101 
0102   //! Return image depth in pixels.
0103   Standard_Size Depth() const { return myData.SizeZ; }
0104 
0105   //! Return image width in pixels.
0106   Standard_Size SizeX() const { return myData.SizeX; }
0107 
0108   //! Return image height in pixels.
0109   Standard_Size SizeY() const { return myData.SizeY; }
0110 
0111   //! Return image depth in pixels.
0112   Standard_Size SizeZ() const { return myData.SizeZ; }
0113 
0114   //! Return image width x height x depth in pixels.
0115   NCollection_Vec3<Standard_Size> SizeXYZ() const
0116   {
0117     return NCollection_Vec3<Standard_Size> (myData.SizeX, myData.SizeY, myData.SizeZ);
0118   }
0119 
0120   //! Return width / height.
0121   Standard_Real Ratio() const
0122   {
0123     return (SizeY() > 0) ? (Standard_Real(SizeX()) / Standard_Real(SizeY())) : 1.0;
0124   }
0125 
0126   //! Return true if data is NULL.
0127   bool IsEmpty() const { return myData.IsEmpty(); }
0128 
0129   //! Empty constructor. Initialize the NULL image plane.
0130   Standard_EXPORT Image_PixMap();
0131 
0132   //! Destructor
0133   Standard_EXPORT virtual ~Image_PixMap();
0134 
0135   //! Returns the pixel color. This function is relatively slow.
0136   //! Beware that this method takes coordinates in opposite order in contrast to ::Value() and ::ChangeValue().
0137   //! @param[in] theX column index from left, starting from 0
0138   //! @param[in] theY row    index from top,  starting from 0
0139   //! @param[in] theToLinearize when TRUE, the color stored in non-linear color space (e.g. Image_Format_RGB) will be linearized
0140   //! @return the pixel color
0141   Quantity_ColorRGBA PixelColor (Standard_Integer theX,
0142                                  Standard_Integer theY,
0143                                  Standard_Boolean theToLinearize = false) const
0144   {
0145     if (IsEmpty()
0146      || theX < 0 || (Standard_Size )theX >= SizeX()
0147      || theY < 0 || (Standard_Size )theY >= SizeY())
0148     {
0149       return Quantity_ColorRGBA (0.0f, 0.0f, 0.0f, 0.0f); // transparent
0150     }
0151 
0152     const Standard_Byte* aRawPixel = RawValueXY (theX, theY);
0153     return ColorFromRawPixel (aRawPixel, myImgFormat, theToLinearize);
0154   }
0155 
0156   //! Sets the pixel color. This function is relatively slow.
0157   //! Beware that this method takes coordinates in opposite order in contrast to ::Value() and ::ChangeValue().
0158   //! @param[in] theX column index from left
0159   //! @param[in] theY row    index from top
0160   //! @param[in] theColor color to store
0161   //! @param[in] theToDeLinearize when TRUE, the gamma correction will be applied for storing in non-linear color space (e.g. Image_Format_RGB)
0162   void SetPixelColor (const Standard_Integer theX,
0163                       const Standard_Integer theY,
0164                       const Quantity_Color&  theColor,
0165                       const Standard_Boolean theToDeLinearize = false)
0166   {
0167     SetPixelColor (theX, theY, Quantity_ColorRGBA (theColor, 1.0f), theToDeLinearize);
0168   }
0169 
0170   //! Sets the pixel color. This function is relatively slow.
0171   //! Beware that this method takes coordinates in opposite order in contrast to ::Value() and ::ChangeValue().
0172   //! @param[in] theX column index from left
0173   //! @param[in] theY row    index from top
0174   //! @param[in] theColor color to store
0175   //! @param[in] theToDeLinearize when TRUE, the gamma correction will be applied for storing in non-linear color space (e.g. Image_Format_RGB)
0176   void SetPixelColor (const Standard_Integer theX,
0177                       const Standard_Integer theY,
0178                       const Quantity_ColorRGBA& theColor,
0179                       const Standard_Boolean theToDeLinearize = false)
0180   {
0181     if (IsEmpty()
0182     || theX < 0 || Standard_Size(theX) >= SizeX()
0183     || theY < 0 || Standard_Size(theY) >= SizeY())
0184     {
0185       return;
0186     }
0187 
0188     Standard_Byte* aRawPixel = ChangeRawValueXY (theX, theY);
0189     ColorToRawPixel (aRawPixel, myImgFormat, theColor, theToDeLinearize);
0190   }
0191 
0192   //! Initialize image plane as wrapper over alien data.
0193   //! Data will not be copied! Notice that caller should ensure
0194   //! that data pointer will not be released during this wrapper lifetime.
0195   //! You may call InitCopy() to perform data copying.
0196   Standard_EXPORT virtual bool InitWrapper (Image_Format         thePixelFormat,
0197                                             Standard_Byte*       theDataPtr,
0198                                             const Standard_Size  theSizeX,
0199                                             const Standard_Size  theSizeY,
0200                                             const Standard_Size  theSizeRowBytes = 0);
0201 
0202   //! Initialize image plane with required dimensions.
0203   //! Memory will be left uninitialized (performance trick).
0204   Standard_EXPORT virtual bool InitTrash (Image_Format        thePixelFormat,
0205                                           const Standard_Size theSizeX,
0206                                           const Standard_Size theSizeY,
0207                                           const Standard_Size theSizeRowBytes = 0);
0208 
0209   //! Initialize by copying data.
0210   //! If you want to copy alien data you should create wrapper using InitWrapper() before.
0211   Standard_EXPORT virtual bool InitCopy (const Image_PixMap& theCopy);
0212 
0213   //! Initialize image plane with required dimensions.
0214   //! Buffer will be zeroed (black color for most formats).
0215   bool InitZero (Image_Format        thePixelFormat,
0216                  const Standard_Size theSizeX,
0217                  const Standard_Size theSizeY,
0218                  const Standard_Size theSizeRowBytes = 0,
0219                  const Standard_Byte theValue = 0)
0220   {
0221     return InitZero3D (thePixelFormat, NCollection_Vec3<Standard_Size> (theSizeX, theSizeY, 1), theSizeRowBytes, theValue);
0222   }
0223 
0224   //! Method correctly deallocate internal buffer.
0225   Standard_EXPORT virtual void Clear();
0226 
0227 public:
0228 
0229   //! Initialize 2D/3D image as wrapper over alien data.
0230   //! Data will not be copied! Notice that caller should ensure
0231   //! that data pointer will not be released during this wrapper lifetime.
0232   //! You may call InitCopy() to perform data copying.
0233   Standard_EXPORT virtual bool InitWrapper3D (Image_Format thePixelFormat,
0234                                               Standard_Byte* theDataPtr,
0235                                               const NCollection_Vec3<Standard_Size>& theSizeXYZ,
0236                                               const Standard_Size theSizeRowBytes = 0);
0237 
0238   //! Initialize 2D/3D image with required dimensions.
0239   //! Memory will be left uninitialized (performance trick).
0240   Standard_EXPORT virtual bool InitTrash3D (Image_Format thePixelFormat,
0241                                             const NCollection_Vec3<Standard_Size>& theSizeXYZ,
0242                                             const Standard_Size theSizeRowBytes = 0);
0243 
0244   //! Initialize 2D/3D image with required dimensions.
0245   //! Buffer will be zeroed (black color for most formats).
0246   Standard_EXPORT bool InitZero3D (Image_Format thePixelFormat,
0247                                    const NCollection_Vec3<Standard_Size>& theSizeXYZ,
0248                                    const Standard_Size theSizeRowBytes = 0,
0249                                    const Standard_Byte theValue = 0);
0250 
0251 public: //! @name low-level API for batch-processing (pixels reading / comparison / modification)
0252 
0253   //! Returns TRUE if image data is stored from Top to the Down.
0254   //! By default Bottom Up order is used instead
0255   //! (topmost scanlines starts from the bottom in memory).
0256   //! which is most image frameworks naturally support.
0257   //!
0258   //! Notice that access methods within this class automatically
0259   //! convert input row-index to apply this flag!
0260   //! You should use this flag only if interconnect with alien APIs and buffers.
0261   //! @return true if image data is top-down
0262   bool IsTopDown() const { return myData.TopToDown == 1; }
0263 
0264   //! Setup scanlines order in memory - top-down or bottom-up.
0265   //! Drawers should explicitly specify this value if current state IsTopDown() was ignored!
0266   //! @param theIsTopDown top-down flag
0267   void SetTopDown (const bool theIsTopDown) { myData.SetTopDown (theIsTopDown); }
0268 
0269   //! Returns +1 if scanlines ordered in Top->Down order in memory and -1 otherwise.
0270   //! @return scanline increment for Top->Down iteration
0271   Standard_Size TopDownInc() const { return myData.TopToDown; }
0272 
0273   //! Return data pointer for low-level operations (copying entire buffer, parsing with extra tools etc.).
0274   const Standard_Byte* Data() const { return myData.Data(); }
0275 
0276   //! Return data pointer for low-level operations (copying entire buffer, parsing with extra tools etc.).
0277   Standard_Byte* ChangeData() { return myData.ChangeData(); }
0278 
0279   //! Return data pointer to requested row (first column).
0280   //! Indexation starts from 0.
0281   const Standard_Byte* Row (Standard_Size theRow) const { return myData.Row (theRow); }
0282 
0283   //! Return data pointer to requested row (first column).
0284   //! Indexation starts from 0.
0285   Standard_Byte* ChangeRow (Standard_Size theRow) { return myData.ChangeRow (theRow); }
0286 
0287   //! Return data pointer to requested 2D slice.
0288   //! Indexation starts from 0.
0289   const Standard_Byte* Slice (Standard_Size theSlice) const { return myData.Slice (theSlice); }
0290 
0291   //! Return data pointer to requested 2D slice.
0292   //! Indexation starts from 0.
0293   Standard_Byte* ChangeSlice (Standard_Size theSlice) { return myData.ChangeSlice (theSlice); }
0294 
0295   //! Return data pointer to requested row (first column).
0296   //! Indexation starts from 0.
0297   const Standard_Byte* SliceRow (Standard_Size theSlice,
0298                                  Standard_Size theRow) const
0299   {
0300     return myData.SliceRow (theSlice, theRow);
0301   }
0302 
0303   //! Return data pointer to requested row (first column).
0304   //! Indexation starts from 0.
0305   Standard_Byte* ChangeSliceRow (Standard_Size theSlice,
0306                                  Standard_Size theRow)
0307   {
0308     return myData.ChangeSliceRow (theSlice, theRow);
0309   }
0310 
0311   //! Return bytes reserved for one pixel (may include extra bytes for alignment).
0312   Standard_Size SizePixelBytes() const { return myData.SizeBPP; }
0313 
0314   //! Return bytes reserved per row.
0315   //! Could be larger than needed to store packed row (extra bytes for alignment etc.).
0316   Standard_Size SizeRowBytes() const { return myData.SizeRowBytes; }
0317 
0318   //! Return the extra bytes in the row.
0319   Standard_Size RowExtraBytes() const
0320   {
0321     return SizeRowBytes() - SizeX() * SizePixelBytes();
0322   }
0323 
0324   //! Compute the maximal row alignment for current row size.
0325   //! @return maximal row alignment in bytes (up to 16 bytes).
0326   Standard_Size MaxRowAligmentBytes() const { return myData.MaxRowAligmentBytes(); }
0327 
0328   //! Return number of bytes per 2D slice.
0329   Standard_Size SizeSliceBytes() const { return myData.SizeSliceBytes; }
0330 
0331   //! Return buffer size
0332   Standard_Size SizeBytes() const { return myData.Size(); }
0333 
0334 public:
0335 
0336   //! Access image pixel with specified color type.
0337   //! Indexation starts from 0.
0338   //! This method does not perform any type checks - use on own risk (check Format() before)!
0339   //! WARNING: Input parameters are defined in the decreasing majority following memory layout - e.g. row first, column next.
0340   template <typename ColorType_t>
0341   const ColorType_t& Value (Standard_Size theRow,
0342                             Standard_Size theCol) const
0343   {
0344     return *reinterpret_cast<const ColorType_t*>(myData.Value (theRow, theCol));
0345   }
0346 
0347   //! Access image pixel with specified color type.
0348   //! Indexation starts from 0.
0349   //! This method does not perform any type checks - use on own risk (check Format() before)!
0350   //! WARNING: Input parameters are defined in the decreasing majority following memory layout - e.g. row first, column next.
0351   template <typename ColorType_t>
0352   ColorType_t& ChangeValue (Standard_Size theRow,
0353                             Standard_Size theCol)
0354   {
0355     return *reinterpret_cast<ColorType_t* >(myData.ChangeValue (theRow, theCol));
0356   }
0357 
0358   //! Access image pixel as raw data pointer.
0359   //! Indexation starts from 0.
0360   //! This method does not perform any type checks - use on own risk (check Format() before)!
0361   //! WARNING: Input parameters are defined in the decreasing majority following memory layout - e.g. row first, column next.
0362   const Standard_Byte* RawValue (Standard_Size theRow,
0363                                  Standard_Size theCol) const
0364   {
0365     return myData.Value (theRow, theCol);
0366   }
0367 
0368   //! Access image pixel as raw data pointer.
0369   //! Indexation starts from 0.
0370   //! This method does not perform any type checks - use on own risk (check Format() before)!
0371   //! WARNING: Input parameters are defined in the decreasing majority following memory layout - e.g. row first, column next.
0372   Standard_Byte* ChangeRawValue (Standard_Size theRow,
0373                                  Standard_Size theCol)
0374   {
0375     return myData.ChangeValue (theRow, theCol);
0376   }
0377 
0378   //! Access image pixel with specified color type.
0379   //! Indexation starts from 0.
0380   //! This method does not perform any type checks - use on own risk (check Format() before)!
0381   //! WARNING: Input parameters are defined in traditional X, Y order.
0382   template <typename ColorType_t>
0383   const ColorType_t& ValueXY (Standard_Size theX,
0384                               Standard_Size theY) const
0385   {
0386     return *reinterpret_cast<const ColorType_t*>(myData.ValueXY (theX, theY));
0387   }
0388 
0389   //! Access image pixel with specified color type.
0390   //! Indexation starts from 0.
0391   //! This method does not perform any type checks - use on own risk (check Format() before)!
0392   //! WARNING: Input parameters are defined in traditional X, Y order.
0393   template <typename ColorType_t>
0394   ColorType_t& ChangeValueXY (Standard_Size theX,
0395                               Standard_Size theY)
0396   {
0397     return *reinterpret_cast<ColorType_t* >(myData.ChangeValueXY (theX, theY));
0398   }
0399 
0400   //! Access image pixel as raw data pointer.
0401   //! Indexation starts from 0.
0402   //! This method does not perform any type checks - use on own risk (check Format() before)!
0403   //! WARNING: Input parameters are defined in traditional X, Y order.
0404   const Standard_Byte* RawValueXY (Standard_Size theX,
0405                                    Standard_Size theY) const
0406   {
0407     return myData.ValueXY (theX, theY);
0408   }
0409 
0410   //! Access image pixel as raw data pointer.
0411   //! Indexation starts from 0.
0412   //! This method does not perform any type checks - use on own risk (check Format() before)!
0413   //! WARNING: Input parameters are defined in traditional X, Y order.
0414   Standard_Byte* ChangeRawValueXY (Standard_Size theX,
0415                                    Standard_Size theY)
0416   {
0417     return myData.ChangeValueXY (theX, theY);
0418   }
0419 
0420 public:
0421 
0422   //! Access image pixel with specified color type.
0423   //! Indexation starts from 0.
0424   //! This method does not perform any type checks - use on own risk (check Format() before)!
0425   //! WARNING: Input parameters are defined in traditional X, Y, Z order.
0426   template <typename ColorType_t>
0427   const ColorType_t& ValueXYZ (Standard_Size theX,
0428                                Standard_Size theY,
0429                                Standard_Size theZ) const
0430   {
0431     return *reinterpret_cast<const ColorType_t*>(myData.ValueXYZ (theX, theY, theZ));
0432   }
0433 
0434   //! Access image pixel with specified color type.
0435   //! Indexation starts from 0.
0436   //! This method does not perform any type checks - use on own risk (check Format() before)!
0437   //! WARNING: Input parameters are defined in traditional X, Y, Z order.
0438   template <typename ColorType_t>
0439   ColorType_t& ChangeValueXYZ (Standard_Size theX,
0440                                Standard_Size theY,
0441                                Standard_Size theZ)
0442   {
0443     return *reinterpret_cast<ColorType_t* >(myData.ChangeValueXYZ (theX, theY, theZ));
0444   }
0445 
0446   //! Access image pixel as raw data pointer.
0447   //! Indexation starts from 0.
0448   //! This method does not perform any type checks - use on own risk (check Format() before)!
0449   //! WARNING: Input parameters are defined in traditional X, Y, Z order.
0450   const Standard_Byte* RawValueXYZ (Standard_Size theX,
0451                                     Standard_Size theY,
0452                                     Standard_Size theZ) const
0453   {
0454     return myData.ValueXYZ (theX, theY, theZ);
0455   }
0456 
0457   //! Access image pixel as raw data pointer.
0458   //! Indexation starts from 0.
0459   //! This method does not perform any type checks - use on own risk (check Format() before)!
0460   //! WARNING: Input parameters are defined in traditional X, Y, Z order.
0461   Standard_Byte* ChangeRawValueXYZ (Standard_Size theX,
0462                                     Standard_Size theY,
0463                                     Standard_Size theZ)
0464   {
0465     return myData.ChangeValueXYZ (theX, theY, theZ);
0466   }
0467 
0468 public:
0469 
0470   //! Convert 16-bit half-float value into 32-bit float (simple conversion).
0471   static float ConvertFromHalfFloat (const uint16_t theHalf)
0472   {
0473     union FloatUint32 { float Float32; uint32_t UInt32; };
0474 
0475     const uint32_t e = (theHalf & 0x7C00) >> 10; // exponent
0476     const uint32_t m = (theHalf & 0x03FF) << 13; // mantissa
0477     FloatUint32 mf, aRes;
0478     mf.Float32 = (float )m;
0479     const uint32_t v = mf.UInt32 >> 23; // evil log2 bit hack to count leading zeros in denormalized format
0480     aRes.UInt32 = (theHalf & 0x8000)<<16 | (e != 0) * ((e + 112) << 23 | m) | ((e == 0) & (m != 0)) * ((v - 37) << 23 | ((m << (150 - v)) & 0x007FE000)); // sign : normalized : denormalized
0481     return aRes.Float32;
0482   }
0483 
0484   //! Convert 32-bit float value into IEEE-754 16-bit floating-point format without infinity:
0485   //! 1-5-10, exp-15, +-131008.0, +-6.1035156E-5, +-5.9604645E-8, 3.311 digits.
0486   static uint16_t ConvertToHalfFloat (const float theFloat)
0487   {
0488     union FloatUint32 { float Float32; uint32_t UInt32; };
0489     FloatUint32 anInput;
0490     anInput.Float32 = theFloat;
0491     const uint32_t b = anInput.UInt32 + 0x00001000; // round-to-nearest-even: add last bit after truncated mantissa
0492     const uint32_t e = (b & 0x7F800000) >> 23; // exponent
0493     const uint32_t m =  b & 0x007FFFFF; // mantissa; in line below: 0x007FF000 = 0x00800000-0x00001000 = decimal indicator flag - initial rounding
0494     return (uint16_t)((b & 0x80000000) >> 16 | (e > 112) * ((((e - 112) << 10) & 0x7C00) | m >> 13)
0495          | ((e < 113) & (e > 101)) * ((((0x007FF000 + m) >> (125 - e)) + 1) >> 1) | (e > 143) * 0x7FFF); // sign : normalized : denormalized : saturate
0496   }
0497 
0498 protected:
0499 
0500   Image_PixMapData myData;      //!< data buffer
0501   Image_Format     myImgFormat; //!< pixel format
0502 
0503 private:
0504 
0505   //! Copying allowed only within Handles
0506   Image_PixMap            (const Image_PixMap& );
0507   Image_PixMap& operator= (const Image_PixMap& );
0508 
0509 };
0510 
0511 DEFINE_STANDARD_HANDLE(Image_PixMap, Standard_Transient)
0512 
0513 #endif // _Image_PixMap_H__