×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Regular Contributor
    Join Date
    Aug 2008
    Posts
    62

    Camera Wrapper and Snapshot Jpeg Quality

    Hello,

    I am using the Nokia Camera Wrapper (http://www.forum.nokia.com/info/sw.n..._0_en.zip.html) to capture snapshot images.

    It all works well my N96 phone, but I have noticed that setting the Jpeg quality has no effect.
    Here is a code sample (note that I only wish to show how I'm setting the jpeg quality, not post the whole initialization code here):



    Code:
    CCameraEngine* cameraEngine;
    int jpegQuality = 50;
    
    // Set the quality.
    TRAPD( serr, cameraEngine->Camera()->SetJpegQuality(jpegQuality) );
    if (serr != KErrNone) 
        return _error( ERR_CAMERA_FAILED, L"failed to set jpeg quality" );
    
    // I even check if the quality has been set.
    if (cameraEngine->Camera()->JpegQuality() != jpegQuality)
        return _error( ERR_CAMERA_FAILED, L"failed to set jpeg quality" );
    
    // Start the snapshot.
    TSize sz(2048, 1536);
    cameraEngine->PrepareL( sz );
    cameraEngine->CaptureL();

    The captured Jpeg snapshot is always relatively big (some 2-3 MB for a 3 Megapixel snapshot) and it does look "good" so I guess the camera wrapper always uses the maximum Jpeg quality.

    The docu of CCameraEngine states:
    Code:
      /**
       * Returns a pointer to CCamera object used by the engine.
       * Allows getting access to additional functionality
       * from CCamera - do not use for functionality already provided
       * by CCameraEngine methods.
       */
      IMPORT_C CCamera* Camera();
    Since I have not found any function to set the snapshot quality in CCameraEngine, I guess I should be able to use the CCamera's one.

    How can I set the jpeg quality when using CCameraEngine? Directly access the CCamera's one? Or is there is no way to set it (CCameraEngine always shoots with 100% quality)?
    Last edited by NevenS; 2009-07-08 at 07:43.

  2. #2
    Super Contributor
    Join Date
    Jul 2008
    Posts
    2,020

    Re: Camera Wrapper and Snapshot Jpeg Quality

    Quote Originally Posted by NevenS View Post
    Hello,

    I am using the Nokia Camera Wrapper (http://www.forum.nokia.com/info/sw.n..._0_en.zip.html) to capture snapshot images.

    It all works well my N96 phone, but I have noticed that setting the Jpeg quality has no effect.
    Here is a code sample (note that I only wish to show how I'm setting the jpeg quality, not post the whole initialization code here):



    Code:
    CCameraEngine* cameraEngine;
    int jpegQuality = 50;
    
    // Set the quality.
    TRAPD( serr, cameraEngine->Camera()->SetJpegQuality(jpegQuality) );
    if (serr != KErrNone) 
        return _error( ERR_CAMERA_FAILED, L"failed to set jpeg quality" );
    
    // I even check if the quality has been set.
    if (cameraEngine->Camera()->JpegQuality() != jpegQuality)
        return _error( ERR_CAMERA_FAILED, L"failed to set jpeg quality" );
    
    // Start the snapshot.
    TSize sz(2048, 1536);
    cameraEngine->PrepareL( sz );
    cameraEngine->CaptureL();

    The captured Jpeg snapshot is always relatively big (some 2-3 MB for a 3 Megapixel snapshot) and it does look "good" so I guess the camera wrapper always uses the maximum Jpeg quality.

    The docu of CCameraEngine states:
    Code:
      /**
       * Returns a pointer to CCamera object used by the engine.
       * Allows getting access to additional functionality
       * from CCamera - do not use for functionality already provided
       * by CCameraEngine methods.
       */
      IMPORT_C CCamera* Camera();
    Since I have not found any function to set the snapshot quality in CCameraEngine, I guess I should be able to use the CCamera's one.

    How can I set the jpeg quality when using CCameraEngine? Directly access the CCamera's one? Or is there is no way to set it (CCameraEngine always shoots with 100% quality)?
    Hi,
    this being Nokia, I would not hold my breath for a bug fix.

    Instead, I would just reencode the file on the go. But - seriously, if you get the files in 100% quality, let them be in that way. Hundreds of customers would pay for an app which offers them that!
    The lines above are the best I have to offer.If anyone of you is of more advanced knowledge, I ask for your patience and understanding! - unknown arab poet
    http://www.tamoggemon.com - Symbian blog - Windows Phone blog
    My other blogs:
    webOS blog iPhone blog BlackBerry blog Samsung bada blog Android blog

Posting Permissions

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