-void JPEGFragment::DecompressJPEGFragmentedFramesFromFile(JOCTET *buffer, uint8_t* raw, int nBits, size_t &howManyRead, size_t &howManyWritten, size_t totalLength)
-{
- if ( nBits == 8)
- {
- if ( ! gdcm_read_JPEG_memory8( buffer+howManyRead, totalLength-howManyRead,
- raw+howManyWritten,
- &howManyRead, &howManyWritten ) )
- {
- gdcmErrorMacro( "Failed to read jpeg8");
- //delete [] buffer;
- //return false;
- }
- }
- else if ( nBits <= 12)
- {
-
- if ( ! gdcm_read_JPEG_memory12( buffer+howManyRead, totalLength-howManyRead,
- raw+howManyWritten,
- &howManyRead, &howManyWritten ) )
- {
- gdcmErrorMacro( "Failed to read jpeg12");
- //delete [] buffer;
- //return false;
- }
- }
- else if ( nBits <= 16)
- {
-
- if ( ! gdcm_read_JPEG_memory16( buffer+howManyRead, totalLength-howManyRead,
- raw+howManyWritten,
- &howManyRead, &howManyWritten ) )
- {
- gdcmErrorMacro( "Failed to read jpeg16 ");
- //delete [] buffer;
- //return false;
- }
- }
- else
- {
- // other JPEG lossy not supported
- gdcmErrorMacro( "Unsupported jpeg lossy compression ");
- //delete [] buffer;
- //return false;
- }
+//-----------------------------------------------------------------------------
+// Protected
+
+//-----------------------------------------------------------------------------
+// Private