×

Discussion Board

Results 1 to 6 of 6
  1. #1
    Registered User
    Join Date
    Sep 2003
    Location
    Fort Collins Colorado
    Posts
    31

    Getting JPEG in HBufC8 directly from CCamera?

    It looks like ECam might support capturing images from the camera directly in JPEG format, perhaps by using something like:

    iCamera->PrepareImageCaptureL( CCamera::EFormatJpeg, 0 );

    and then having the data returned in the HBufC8 parameter in:
    "ImageReady(CFbsBitmap* aBitmap, HBufC8* aData, TInt aError)".

    Unfortunatly I can't get it to work on a 6630, I get "Feature Not Supported" when PrepareImageCapture() is executed.

    This could potentially be much faster than capturing the image as a bitmap and then using "CImageEncoder" to convert it to JPEG for saving.

    Am I doing this right? Is this the way to get a JPEG encoded HBufC8 directly from the CCamera? If not on the 6630, is this supported by other models? Is there another way to do it?

    Interestingly CCamera has a function to set the JPEG quality:
    iCamera->SetJpegQuality( TInt );
    So one might assume you could get a JPEG encoded descriptor back...

    Any help is greatly appreciated.
    Ken

  2. #2
    Nokia Developer Expert
    Join Date
    Dec 2003
    Posts
    148

    Re: Getting JPEG in HBufC8 directly from CCamera?

    Check the supported still capture image formats. You will find out that EFormatJpeg is not supported but EFormatExif is... But anyway, your code should always check what is supported and what is not. (try searching TCameraInfo from Symbian docs.)

  3. #3
    Registered User
    Join Date
    Sep 2003
    Location
    Fort Collins Colorado
    Posts
    31

    Re: Getting JPEG in HBufC8 directly from CCamera?

    Excellent, thanks for the tip, I'll give it a try and post my result!
    THANKS!!!

  4. #4
    Registered User
    Join Date
    Sep 2003
    Location
    Fort Collins Colorado
    Posts
    31

    Re: Getting JPEG in HBufC8 directly from CCamera?

    It works! And 10 times faster than the bitmap method! I couldn't find EFormatExif in any documentation, all I found was EFormatJpeg, which I must say seems to make more sense, but whatever, thanks for the tip, your my new best friend!

    Ken

  5. #5
    Nokia Developer Expert
    Join Date
    Dec 2003
    Posts
    148

    Re: Getting JPEG in HBufC8 directly from CCamera?


  6. #6
    Registered User
    Join Date
    Sep 2003
    Location
    Fort Collins Colorado
    Posts
    31

    Re: Getting JPEG in HBufC8 directly from CCamera?

    So it is. I've never quite been sure what documents apply to what phones, I've been using the documentation from the Symbian 7 sdk, I see now the flag is in the 8.0a documentation, but works when I compile with 7. In any case thanks for the pointer, it helped me a lot.
    Ken

Similar Threads

  1. Inserting Gif Jpeg and Bmp directly to Rich text Editor
    By pravin_swami in forum Symbian User Interface
    Replies: 1
    Last Post: 2005-02-03, 05:02
  2. Display jpeg on grid list gives kern-exec 3?
    By flicker82 in forum Symbian User Interface
    Replies: 1
    Last Post: 2005-01-18, 05:18
  3. I want to know how to retreive a JPEG picture from internet
    By popeyelin in forum Mobile Java Media (Graphics & Sounds)
    Replies: 2
    Last Post: 2004-03-05, 19:40
  4. browsing jpeg in xhtml
    By jyus in forum Browsing and Mark-ups
    Replies: 2
    Last Post: 2003-06-19, 11:18
  5. CFbsBitmap to Jpeg HBufC8 and back
    By imrogers in forum Symbian
    Replies: 0
    Last Post: 2003-03-21, 09:59

Posting Permissions

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