This isn't directly an answer to your question, more a comment on your approach. In this binary file, can you be certain that all occurances of these 2 bytes represent start/end image markers, and are not either code or data from the binary stuff surrounding the embedded jpg's?
This is something you may need to consider with your design.