I have a UTF-8 encoded file and would like to pop an output stream on the image part of the file. Any suggestions on how to filter everything out of the stream except the image data?
+2
A:
Scan the file for the various image file magic numbers, and attempt decoding from that position.
Ignacio Vazquez-Abrams
2010-07-28 01:04:41
Do you think the image is at the end of the file? I would find the magic numbers for the beginning and then stop at the end of the file or is there also magic termination characters?
Noah Seidman
2010-07-28 01:07:18
Decoding will stop when the image processing library stops it.
Ignacio Vazquez-Abrams
2010-07-28 01:14:45