I have build a program where a picture from the camera is saved to a file. I use 2 buttons. One for the snapshot and one for the saving of data. The structure is identical to the CameraDemo.
The save the picture to a file consist of the following:
if (b == &button1)
{
String filenaam = "something";
FileOutputStream stream (File::getSpecialLocation(File::userDocumentsDirectory).getChildFile (filenaam));
JPEGImageFormat jpgWriter;
jpgWriter.writeImageToStream(lastSnapshot.getImage(), stream);
}
I expected the picture that is showed as preview to be written down as a file. The strange thing happening is that it makes a new picture and store that in a file.
I want the preview to be stored as a file. What do I do wrong?
Kind regards,
Harrie