Camera captured image format

Camera captured image format


I'm using the MCA SDK to implement camera support, and have been successful in opening a preview window and capturing a frame. However I want to be able to save this image to the hard drive, and am having trouble establishing what format the image object is in.

I found this in the developers guide:

'The MCA SDK provides support for the preview and capturing of digital images. Captured images are temporarily cached on disk in an encrypted format to prevent other applications or users from gaining access to them. The MCA SDK does not provide support for other image formats, such as JPG, GIF and PNG. Image conversion / compression must be handled by the application developer.'

This doesn't provide information on what format the cached file is though, or how to use it in a useful context. Calling the Image.Save() function on the frame object throws 'A generic error in GDI+.' Does anyone have any idea how to access the image data from a captured frame in C#?

Any help would be much appreciated,

3 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

The internal format is a bitmap. You can save it to a file in .BMP formatwith:

myFrame.Image.Save ("MyImage.bmp");

If you require a different format, you can usefunctionality provided by .Net's Image class to convert it to a different format while saving. For example:

myFrame.Image.Save ("MyImage.jpg", System.Drawing.Imaging.ImageFormat.Jpeg);


thanks for that - sorted the problem and it works a charm now

Leave a Comment

Please sign in to add a comment. Not a member? Join today