×

Discussion Board

Page 1 of 2 12 LastLast
Results 1 to 15 of 18
  1. #1
    Regular Contributor
    Join Date
    Feb 2009
    Posts
    128

    how to save image captured by camera

    hi,
    i am using the capturing image and saving exemple in the forum.
    there is no error but the image is not saved.
    this is my code :
    void CCameraEngine::ImageReady(CFbsBitmap* aBitmap, HBufC8* aData, TInt aError)
    {

    if (!aError) {
    RFs fsSession;
    RFile aFile;
    User::LeaveIfError(fsSession.Connect());
    _LIT(KFilename, "E:\\Images\\001.jpg");
    aFile.Replace(fsSession, KFilename, EFileWrite|EFileShareAny);
    aBitmap->Save(KFilename);
    aFile.Flush();
    aFile.Close();
    fsSession.Close();
    }

    //void CMyappAppUi::HandleCommandL(TInt aCommand)
    ...
    case Ecam:
    {
    CCameraController* iCameraController= CCameraController::NewL();
    iCameraController->InitializeCameraL();
    iCameraController->SnapL();
    break;
    ....

    My device 6630

    Thnak u

  2. #2
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,691

    Re: how to save image captured by camera

    CFbsBitmap::Save produces you a Multi-Bitmap file (.mbm), regardless of the extension you specify. If you want .jpg, either use CImageEncoder, or capture .jpg directly (EFormatJpeg/Exif to PrepareImageCaptureL).
    And you can find examples for both of them: visit the Docs section above, Camera and ICL examples are under Symbian C++ / Multimedia.

  3. #3
    Regular Contributor
    Join Date
    Feb 2009
    Posts
    128

    Re: how to save image captured by camera

    Thenk you very very much
    it work fine i can save image captured by camera and i can control the jpeg quality..
    Now i want to send it by CSD
    but my application crash

    This is my code :
    ///////////////////////////////////////////
    void ServerApp::ConstructL()
    {
    iTelephony = CTelephony::NewL();
    CActiveScheduler::Add(this);
    }

    ServerApp::~ServerApp()
    {
    Cancel();
    delete iTelephony;
    }

    void ServerApp::GetCall()
    {
    iTelephony->ReceiveDataCall(
    iStatus,
    iDataPort);
    iState = EEstablishing;
    SetActive();
    }
    ////////////////////////////////////////
    void ServerApp::RunL()
    {

    if ( (iStatus == KErrNone) && (iState = EEstablishing) )
    {
    RFs& fsSession = CEikonEnv::Static()->FsSession();
    _LIT(KFilename, "C:\\Data\\Images\\image.jpeg");
    RFile file;
    TInt frErr = file.Open(fsSession, KFilename, EFileRead);
    if(frErr==KErrNone)
    {
    TBuf8<20000> iReadBuffer;
    file.Read(iReadBuffer);
    file.Close();
    }
    iDataPort.Write(iStatus, iReadBuffer);
    iState = EWriting;
    SetActive();
    }
    else
    iTelephony->TerminateDataCall();
    }

    void ServerApp:oCancel()
    {
    iDataPort.Cancel();
    iTelephony->CancelEstablishDataCall();
    }
    /////////////////////////////////////////////////////////////

    how can tell me what is the problem??
    Thanks

  4. #4
    Registered User
    Join Date
    Jun 2007
    Location
    Mumbai, India
    Posts
    1,998

    Re: how to save image captured by camera

    what is the error code you get wen your application crashes.

  5. #5
    Regular Contributor
    Join Date
    Feb 2009
    Posts
    128

    Re: how to save image captured by camera

    I cant enter in my application
    I forget, i make a call for this class in UIclass:
    case EtestCall:
    CClientApp* iCClientApp;
    iCClientApp->GetCall();

  6. #6
    Registered User
    Join Date
    Jun 2007
    Location
    Mumbai, India
    Posts
    1,998

    Re: how to save image captured by camera

    so is your issue resolved?

  7. #7
    Regular Contributor
    Join Date
    Feb 2009
    Posts
    128

    Re: how to save image captured by camera

    Not yet
    just i add the class in my application without used it!
    if i delete it my application work fine!

  8. #8
    Registered User
    Join Date
    Jun 2007
    Location
    Mumbai, India
    Posts
    1,998

    Re: how to save image captured by camera

    When u add it what is the panic or error code you receive

  9. #9
    Regular Contributor
    Join Date
    Feb 2009
    Posts
    128

    Re: how to save image captured by camera

    Hi kamalakshan
    Sorry for the delay,
    I check my code in the N6630. Any error code received but didnt work
    There is a way to know this error???
    Thank you I need our help asap

  10. #10
    Super Contributor
    Join Date
    Mar 2004
    Location
    Bangalore,India
    Posts
    2,146

    Re: how to save image captured by camera

    Enable the extended panic code as mentioned in the wiki link below, also debugging the application would help to see whats going wrong...

    http://wiki.forum.nokia.com/index.ph...ded_panic_code
    Cheers,
    Mayank

  11. #11
    Regular Contributor
    Join Date
    Feb 2009
    Posts
    128

    Re: how to save image captured by camera

    there is no pb but two worning displayed:
    - CActive with only non default constructor
    - In class without constructor
    please see my code, theere is a mistake in my constructor class??
    Thank for the big help

  12. #12
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,691

    Re: how to save image captured by camera

    The compiler is right (usually it is).
    CActive has to be initialized with a priority value, so your class should have a constructor, something like this:
    Code:
    ServerApp::ServerApp():CActive(EPriorityStandard)
    {}
    Anyway, if your code 'crashes', you should still consider checking the link suggested by Mayankkedia, 12 hours ago...

  13. #13
    Regular Contributor
    Join Date
    Feb 2009
    Posts
    128

    Re: how to save image captured by camera

    In this forom i found that
    Since S60 2nd Edition FP 2 (Nokia 6630)errrd trick hasn't worked in devices.

    http://discussion.forum.nokia.com/fo...ad.php?t=74395

  14. #14
    Super Contributor
    Join Date
    Mar 2004
    Location
    Bangalore,India
    Posts
    2,146

    Re: how to save image captured by camera

    Hmm then the choices for you would be to use the RFileLogger to log what happens at runtime and then analyze the logs to see where u went wrong.
    Cheers,
    Mayank

  15. #15
    Regular Contributor
    Join Date
    Feb 2009
    Posts
    128

    Re: how to save image captured by camera

    hi mayankkedia
    I have in the emulator "Feature data not supported" but in the device it carsh. i dont no exactely the error.can you just see my code if the is a mistake. please iam bloked since this week:

    CClientApp::CClientApp():CActive(CActive::EPriorityStandard)
    {

    }

    void CClientApp::ConstructL()
    {
    iTelephony = CTelephony::NewL();
    CActiveScheduler::Add(this);
    }

    CClientApp::~CClientApp()
    {
    Cancel(); // if any request outstanding, calls DoCancel() to cleanup
    delete iTelephony;
    }

    void CClientApp::MakeCall()
    {
    _LIT(KNumberToDial, "25958668");
    iTelephony->EstablishDataCall(iStatus,iDataPort,KNumberToDial);
    iState = EEstablishing;
    SetActive();
    }

    void CClientApp::RunL()
    {
    _LIT8(KDataToWrite,"1234567890");
    if ( (iStatus == KErrNone) && (iState = EEstablishing) )
    {
    iDataPort.Write(iStatus,KDataToWrite);
    iState = EWriting;
    SetActive();
    }
    else
    iTelephony->TerminateDataCall();
    }

    void CClientApp:oCancel()
    {
    iDataPort.Cancel();
    iTelephony->CancelEstablishDataCall();
    }

    ///////////
    In UIclass :

    CClientApp* app;
    app= new (ELeave)CClientApp();

    app->MakeCall();

Similar Threads

  1. How to change default camera image in S40 5th edition?
    By asahlot in forum Mobile Java Media (Graphics & Sounds)
    Replies: 2
    Last Post: 2008-11-01, 00:37
  2. Nokia N-Series Complete Model Line-Up
    By Dopod in forum General Development Questions
    Replies: 6
    Last Post: 2008-07-22, 20:16
  3. Save Image
    By dineshk in forum Mobile Java General
    Replies: 29
    Last Post: 2008-05-15, 10:51
  4. Changing the Emulator Camera Image
    By ryanrst in forum Symbian Tools & SDKs
    Replies: 0
    Last Post: 2005-04-09, 17:35
  5. saving jpeg image on grid list
    By flicker82 in forum Symbian
    Replies: 0
    Last Post: 2005-01-21, 04:22

Posting Permissions

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