+public:
+ PixelConvert();
+ ~PixelConvert();
+
+ //// Getter accessors:
+ uint8_t* GetRGB() { return RGB; }
+ size_t GetRGBSize() { return RGBSize; }
+ uint8_t* GetDecompressed() { return Decompressed; }
+ size_t GetDecompressedSize() { return DecompressedSize; }
+ uint8_t* GetLutRGBA() { return LutRGBA; }
+
+ //// Predicates:
+ bool IsDecompressedRGB();
+
+ void Print( std::string indent = "", std::ostream &os = std::cout );
+
+// In progress
+ void GrabInformationsFromHeader( Header* header );
+ bool ReadAndDecompressPixelData( FILE* fp );
+ void Squeeze();
+ bool BuildRGBImage();
+
+private:
+ // Use the fp:
+ bool ReadAndDecompressRLEFragment(
+ uint8_t* subDecompressed,
+ long fragmentSize,
+ long decompressedSegmentSize,
+ FILE* fp );
+ void ReadAndDecompress12BitsTo16Bits( FILE* fp ) throw ( FormatError );
+ bool ReadAndDecompressRLEFile( FILE* fp );
+ bool ReadAndDecompressJPEGFile( FILE* fp );
+
+ // In place (within Decompressed and with no fp access) decompression
+ // or convertion:
+ void BuildLUTRGBA();
+ bool DecompressRLE16BitsFromRLE8Bits( int NumberOfFrames );
+ void ConvertSwapZone();
+ void ConvertReorderEndianity();
+ bool ConvertReArrangeBits() throw ( FormatError );
+ void ConvertRGBPlanesToRGBPixels();
+ void ConvertYcBcRPlanesToRGBPixels();
+ void ConvertHandleColor();
+
+ void ComputeDecompressedAndRGBSizes();
+ void AllocateRGB();
+ void AllocateDecompressed();
+
+// Variables
+ /// Pixel data represented as RGB after LUT color interpretation.