I'm asking once again for some enlightenment from you guys, hope you can help me out.
I'm using an SDK which does some image processing, it also makes it easy to capture from a webcam, but the object it returns is of a proprietry image format.
There is a static method along the lines of
Jpg::save (const Image &img, std::ostream &, int quality=100)
parameter 1 is the returned format of the webcam image capture
parameter 2 is an ostream
parameter 3 is the compression level.
There is a similar method
that saves directly to a file.
Jpg::save (const Image &img, const std::string &filename, int quality=100)
I want, with some frequency, to capture the images from the webcam to display in a Win32 application, however I would prefer not to have to save to the HDD all the time as this is slow. I've been googling alot today on loading jpgs from the HDD to the window using the GDI, if the jpg is in say an ofstream, would loading be similar ? Is this like loading from a HDD without the physical operations ?
I have for example
presuming that since the definition is of ostream, ofstream is what should be used ?
std::ofstream ofs("JpgFile.jpg", std::ios::out | std::ios::binary );
FRsdk::Jpeg::save(img, ofs, 100);
Anyways, your general advice on the matter would be greatly appreciated.