×

Discussion Board

Results 1 to 6 of 6

Thread: Camera_Example

  1. #1
    Registered User
    Join Date
    Jun 2009
    Posts
    2

    Camera_Example

    After switching the output format from JPEG to Bitmap on N96 Device
    the API-callback-function 'CCameraWrapperExampleAppView::MceoCapturedBitmapReady( CFbsBitmap* aBitmap )'
    get's called not. Does anyone have any clue what I am doing wrong ?
    Here's a snippet of my C++ code:
    iCameraWrapper->PrepareL(iCaptureSize, CCamera::EFormatFbsBitmapColor16M)
    instead of
    iCameraWrapper->PrepareL(iCaptureSize)

    void CCameraWrapperExampleAppView::MceoCameraReady()
    {
    iAppUi->UseOptionsExitCbaL();
    if (iCameraWrapper->State() == CCameraEngine::EEngineIdle)
    {
    // Prepare camera
    //TRAPD(err,iCameraWrapper->PrepareL(iCaptureSize));
    TRAPD(err,iCameraWrapper->PrepareL(iCaptureSize, CCamera::EFormatFbsBitmapColor16M));

    if (err)
    {
    SetError(_L("Camera prepare error %d"), err);
    return;
    }
    // Start viewfinder. Viewfinder pictures starts coming into MceoViewFinderFrameReady();
    TRAPD(err2,iCameraWrapper->StartViewFinderL(iViewFinderSize));
    if (err2)
    {
    SetError(_L("Camera start viewfinder error %d"), err2);
    return;
    }
    SetTitle(_L("Camera viewfinder"));
    }
    }

    void CCameraWrapperExampleAppView::MceoCapturedBitmapReady( CFbsBitmap* aBitmap )
    {
    SetTitle(_L("New picture"));
    if (iCameraWrapper)
    iCameraWrapper->ReleaseImageBuffer();
    }
    Last edited by j.kavalerchik; 2009-07-01 at 14:24. Reason: to complete

  2. #2
    Registered User
    Join Date
    Jun 2009
    Posts
    2

    Nokia-provided CameraWrapperExample fails on N96 for (raw) Bitmap Images

    This code does works on devices with Symbian OS v9.1

  3. #3
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,674

    Re: Nokia-provided CameraWrapperExample fails on N96 for (raw) Bitmap Images

    A wrapper is a wrapper, you should check the "real" callback methods (ImageReady or ImageBufferReady, depending on the callback-family the example uses).
    A highly probable problem could be that capturing to bitmap supports lower resolutions than capturing to JPEG (an 5 megapixel uncompressed image would require 15 megabytes of memory, while a similar JPEG image is usually less than 1 megabyte).

  4. #4
    Registered User
    Join Date
    Jun 2009
    Posts
    2

    Re: Nokia-provided CameraWrapperExample fails on N96 for (raw) Bitmap Images

    The image resolution should not be the problem reason, because the used setting is only 1280x960 pixels. This works reliable on other devices (e.g. N73, N95), but not on N96. I assume some sort of bug in the unified camera wrapper. Did anyone succeed grabbing raw bitmap images on a N96 (or another S60/3 FP2 device)?

  5. #5
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,674

    Re: Nokia-provided CameraWrapperExample fails on N96 for (raw) Bitmap Images

    There is no such thing that "it should not be a problem, because it is 1280x960". The existing thing is checking what CCamera::EnumerateCaptureSizes says.

  6. #6
    Registered User
    Join Date
    Jun 2009
    Posts
    2

    Re: Nokia-provided CameraWrapperExample fails on N96 for (raw) Bitmap Images

    Exactly. 1280 x 960 is in the list of supported resolutions. My thought was about memory consumption - about 3MB in this case (this is the same as on the other models).

Posting Permissions

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