×

Discussion Board

Results 1 to 9 of 9
  1. #1
    Regular Contributor
    Join Date
    Aug 2009
    Posts
    80

    how to save a image(captured from camera) to a file

    Hi Everyone,

    I am doing some imgae processing work. At this moment i m able to grab the images (frames) from camera using ecam.lib. Now i want to save this images to a file which will be stored in Memory.
    And also anytime I can use this file to access this images.can anyone help me about how i can write the coding for this or any example coding?

    Thanks
    Sabera

  2. #2
    Super Contributor
    Join Date
    Jan 2007
    Location
    Bhubaneswar, India
    Posts
    1,189

    Re: how to save a image(captured from camera) to a file

    Quote Originally Posted by sabera_mina View Post
    Hi Everyone,

    I am doing some imgae processing work. At this moment i m able to grab the images (frames) from camera using ecam.lib. Now i want to save this images to a file which will be stored in Memory.
    And also anytime I can use this file to access this images.can anyone help me about how i can write the coding for this or any example coding?

    Thanks
    Sabera
    See FN wiki, if you get some help.
    http://wiki.forum.nokia.com/index.ph...captured_image
    -------------------------------------
    Thanks & Regards
    Ram
    Symbian OS 9.2/9.3,S60 3rd FP1/FP2,Carbide.c++v2.0

  3. #3
    Regular Contributor
    Join Date
    Aug 2009
    Posts
    80

    Re: how to save a image(captured from camera) to a file

    Quote Originally Posted by RB_Sahu View Post
    ok. i read this document already.but i can't understand about Replace & Write function in that coding. Is Replace & Write both function is a built function of ecam.lib? If not then where can i get this two functions..

    Thanks
    Sabera

  4. #4
    Super Contributor
    Join Date
    Jan 2007
    Location
    Bhubaneswar, India
    Posts
    1,189

    Re: how to save a image(captured from camera) to a file

    Quote Originally Posted by sabera_mina View Post
    ok. i read this document already.but i can't understand about Replace & Write function in that coding. Is Replace & Write both function is a built function of ecam.lib? If not then where can i get this two functions..

    Thanks
    Sabera
    Replace & Write both function is built-in function. search in sdk with keyword "RFile" for more information.
    -------------------------------------
    Thanks & Regards
    Ram
    Symbian OS 9.2/9.3,S60 3rd FP1/FP2,Carbide.c++v2.0

  5. #5
    Regular Contributor
    Join Date
    Jul 2006
    Posts
    85

    Re: how to save a image(captured from camera) to a file

    Hi
    When you capture the frames for the image in viewfinder. you need to save the buffers from MCAMERABUFFER that comes in IMAGEBUFFERREADY function
    heres the code that you can use for saving theimage


    void CItMMCameraController::ImageBufferReady(MCameraBuffer& aCameraBuffer,TInt aError)
    /**
    * Callback function for CaptureImage()
    * This function saves the captured image
    * @param aCameraBuffer - Reference to MCameraBuffer where the image is captured
    * @param aError - Error value returned
    */
    {
    _LIT(KCambufready, "Camera ImageBufferReady Completed, errcode ");
    iObserver->CameraDoPrintComplete(KCambufready, aError);

    StopViewFinder();
    TDesC8* data =0;
    TInt err;

    TRAP(err, data = aCameraBuffer.DataL(FRAME_INDEX));
    _LIT(KJPSave,"Saving Image in specified format ");
    iObserver->CameraDoPrintComplete(KJPSave);
    TFileName aFullPath;
    aFullPath.Copy(iFilename);
    RFile file;
    file.Replace(ifsSession,aFullPath,EFileWrite);
    file.Write(*data);
    file.Close();
    CActiveScheduler::Stop();
    }

  6. #6
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,175

    Re: how to save a image(captured from camera) to a file

    if you just want to get an image from a camera and get it saved a file, you could also try new file service API from the API plug-in, would ease the implementation of teh camera and saving a lot..

  7. #7
    Regular Contributor
    Join Date
    Aug 2009
    Posts
    80

    Re: how to save a image(captured from camera) to a file

    Quote Originally Posted by symbianyucca View Post
    if you just want to get an image from a camera and get it saved a file, you could also try new file service API from the API plug-in, would ease the implementation of teh camera and saving a lot..
    can you describe detail explain about new file service API from API plug-in..how can i get these file?


    Thanks...

  8. #8
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,175

    Re: how to save a image(captured from camera) to a file

    you could maybe just try searching the wiki a bit, it is really usefull skill to have..

  9. #9
    Regular Contributor
    Join Date
    Aug 2009
    Posts
    80

    Re: how to save a image(captured from camera) to a file

    Quote Originally Posted by symbianyucca View Post
    you could maybe just try searching the wiki a bit, it is really usefull skill to have..
    Yaa ..i know wiki is very useful for developer. anyway i tried and got one example coding about camera caputering. The link is :
    http://wiki.forum.nokia.com/index.ph...uring_an_image

    I alerady build this coding as a new symbian project (open C console).It shows some error during build. I think there may be some changes/add(constructor/destructor) in CAppUi.cpp. In this CAppUi.cpp file they only writen:

    CAppUi.cpp:

    #include "CCameraController.h"

    iCameraController = CCameraController::NewL();
    iCameraController->InitializeCameraL();

    I also added ecam.lib & CAPABILITY UserEnvironment. So what change/add reqiured in CAppUi.cpp please describe the changes(constructor/destructor)..

    Thanks

Similar Threads

  1. How to save a file on the phone?
    By KevinBoyd in forum Mobile Java General
    Replies: 5
    Last Post: 2009-09-22, 15:27
  2. Replies: 0
    Last Post: 2009-09-11, 10:00
  3. Nokia N-Series Complete Model Line-Up
    By Dopod in forum General Development Questions
    Replies: 6
    Last Post: 2008-07-22, 20:16
  4. Contacts fields order??
    By timatima in forum Symbian
    Replies: 1
    Last Post: 2007-06-08, 13:51

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×