Building a Full Featured Mobile Camera Application: C4FCamera

Sign in to queue

The Discussion

  • User profile image
    marauderz

    I haven't tried out your code yet, but have you tried to run your program on images from a 5MP camera, which are about 900k in size? I'm getting an out of memory exception when I try to create the bitmap object.

  • User profile image
    Howler

    Is there a way to easily get an image from the camera without using the CameraDialog class? I want my program to be able to take and store images without having to show the preview and/or waiting for the user to actually take the picture.

  • User profile image
    Clint

    @Howler, So what I've learned is you can do it with native code via DirectShow but it is OEM dependent which means just because the device has a camera, it doesn't mean you can use DirectShow.

    I'd do some tests with the CameraDialog class to see if you can set visiblity and programmatically take pictures.

  • User profile image
    Clint

    @RobG, Yes you can if you do the camera stuff via an ActiveX Control.

    https://blogs.msdn.com/iemobile/archive/2007/06/20/ie-mobile-support-of-activex.aspx

  • User profile image
    Clint

    @RobG you want a pure web app that lets you use the camera?  Let me find out, I'm leaning toward it isn't possible.  I have a few ideas that i know will work on Windows but not sure if they can be done on Mobile.

  • User profile image
    RobG

    Is there a way to do this within a browser based application that uses PIE or IE on WinMo 6.x?

  • User profile image
    Clint

    @RobG  There are samples in the WM SDK that you could merge together to get it running...

    https://msdn.microsoft.com/en-us/library/bb158780.aspx

    The AXSample is an IE Mobile ActiveX sample.  There is also a Camera Capture sample that shows you how to call the native Camera APIs.    You could start with AXSample and plug in the camera code and then you would just need to do some basic smoke testing to make sure the UI works the way you want from inside IE.

  • User profile image
    Clint

    @Neeraj I don't have a WM6.1 Pro device handy / SDK installed so can't be of much help, sorry.  Can you tell me where it is failing?

  • User profile image
    Neeraj

    This applcation is not working on Windows Mobile 6.1 Professional. Actually the InitialDirectory and DefaultFileName is not having any effect on the saved filename. Whatever you name the file it is being saved in /Storage Card/DCIM folder.

    But it is woking fine with Windows Mobile 6 Professional.

    Any ideas ?

  • User profile image
    Clint

    @Neeraj, i don't have a device but could be how they setup their rom.  I can't be positive as I don't have a few devices including that one to test on.  sorry.

  • User profile image
    Neeraj

    Actually I am using Micromax W900 model having WM6.1 Professional(available in india only...I guess).

    The application is working fine with HTC Touch Dual.

    In Micromax following two properties in TakeStillPicture() is  having no effect:

    cameraCapture.DefaultFileName = textDefaultFileName.Text;

    cameraCapture.InitialDirectory = PictureDirectoryPath.Text;

    Regardless of the value you supply to these parameters the Photographs are being stored in \Storage Card\DCIM folder or \My Documents\My Pictures folder depending on the storage location you select on the device.

    I dont know if its a bug with WM 6.1 or my phone has some camera implementation issues.

    Hope I am making it clear.

    Please Help...

Add Your 2 Cents