+void JPEGFragmentsInfo::DecompressJPEGFramesFromFile(std::ifstream *fp, uint8_t *buffer, int nBits, int numBytes, int length)
+{
+ // Pointer to the Raw image
+ uint8_t *localRaw = buffer;
+
+ // Loop on the fragment[s]
+ JPEGFragmentsList::const_iterator it;
+ for( it = Fragments.begin();
+ it != Fragments.end();
+ ++it )
+ {
+ //(*it)->pimage = localRaw;
+ (*it)->DecompressJPEGFramesFromFile(fp, localRaw, nBits, StateSuspension);
+ // update pointer to image after some scanlines read:
+ localRaw = (*it)->pimage;
+ // Advance to next free location in Raw
+ // for next fragment decompression (if any)
+
+ //localRaw += length * numBytes;
+ //std::cerr << "Used to increment by: " << length * numBytes << std::endl;
+ }
+}
+