Camera captured image format

Camera captured image format

Hi,

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,
Tom.

3 posts / 0 nouveau(x)
Dernière contribution
Reportez-vous à notre Notice d'optimisation pour plus d'informations sur les choix et l'optimisation des performances dans les produits logiciels Intel.

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);

hi,

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

Laisser un commentaire

Veuillez ouvrir une session pour ajouter un commentaire. Pas encore membre ? Rejoignez-nous dès aujourd’hui