1 | initial version |
I don't have a good answer, but I have a workaround that should work (until something breaks it).
I wrote my own ReadMpoFIle function loosely based on the logic in the imread_ implementation. To make it work, I had to make a modified version of JpegDecoder, because the released version (2.4.6) of JpegDecoder::readData() calls close. That made it hard to get the decoder into position to decode the second image.
It would be nice to see a more stream-friendly version of the ImageDecoder/JpegDecoder suite. To be stream-friendly, I would say a decoder's core function should take its compressed input from an input iterator.
In fairness of course, OpenCV is a vision library, and not expected to be a comprehensive image file I/O library.