Discussion Board

Results 1 to 10 of 10
  1. #1
    Registered User iotuus's Avatar
    Join Date
    Apr 2005
    Posts
    11
    Hi,

    I take a picture with the camera and want to save it in a jpg file. My code works with the 3650 but doesn't with the 6600.

    The 6600 will simply create a file with 0 KB size and it does not even recognize the extension file because when I open it the text editor is launched.

    here is the code I use:

    ------------- code that works --------------
    void CBECARIOGONContainer::SaveImageL()
    {
    // Be sure that we have an image to be saved
    //HBufC* imageroot = TPAlbSettings::RootImageFolderLC(); // gets the name of the photo album folder
    //iFileName = *imageroot;
    iFileName.Append(KDefaultFileName);

    // generate filename using the framework's file server connection
    CEikApplication::GenerateFileName(iCoeEnv->FsSession(), iFileName);
    //CleanupStack::PopAndDestroy(imageroot);

    // Create Format and Codec
    iFormat->iSettings.iQualityFactor = KJpgSavingQualityFactor; // quality factor from 0 to 100 (55 used here)
    iFormat->iSettings.iSampleScheme = TMdaJpgSettings::TColorSampling(TMdaJpgSettings::EColor420);

    // Create a file to save the image into
    // this is done in an asynch function
    iFileSaver->CreateL(iFileName, iFormat, NULL, NULL);
    }

    ------- code that does not work ----------
    void CBECARIOGONContainer::MiuoCreateComplete(TInt aError)
    {
    if ((aError == KErrNone) && iFileSaver)
    {

    TRAPD( error, iFileSaver->ConvertL(*(iBitmap), TRect(0, 0, 0, 0), 0));
    }
    }
    -------------------------------------------------

    Thanks

  2. #2
    Registered User hliukkon's Avatar
    Join Date
    Jun 2005
    Posts
    35
    Originally posted by iotuus
    Hi,

    I take a picture with the camera and want to save it in a jpg file. My code works with the 3650 but doesn't with the 6600.

    The 6600 will simply create a file with 0 KB size and it does not even recognize the extension file because when I open it the text editor is launched.

    here is the code I use:

    ------------- code that works --------------
    void CBECARIOGONContainer::SaveImageL()
    {
    // Be sure that we have an image to be saved
    //HBufC* imageroot = TPAlbSettings::RootImageFolderLC(); // gets the name of the photo album folder
    //iFileName = *imageroot;
    iFileName.Append(KDefaultFileName);

    // generate filename using the framework's file server connection
    CEikApplication::GenerateFileName(iCoeEnv->FsSession(), iFileName);
    //CleanupStack::PopAndDestroy(imageroot);

    // Create Format and Codec
    iFormat->iSettings.iQualityFactor = KJpgSavingQualityFactor; // quality factor from 0 to 100 (55 used here)
    iFormat->iSettings.iSampleScheme = TMdaJpgSettings::TColorSampling(TMdaJpgSettings::EColor420);

    // Create a file to save the image into
    // this is done in an asynch function
    iFileSaver->CreateL(iFileName, iFormat, NULL, NULL);
    }

    ------- code that does not work ----------
    void CBECARIOGONContainer::MiuoCreateComplete(TInt aError)
    {
    if ((aError == KErrNone) && iFileSaver)
    {

    TRAPD( error, iFileSaver->ConvertL(*(iBitmap), TRect(0, 0, 0, 0), 0));
    }
    }
    -------------------------------------------------

    Thanks

    I think your camera doesn't work.. You should use CCamera in 6600

  3. #3
    Nokia Developer Expert symbianyucca's Avatar
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    28,671
    6600 has wrapper for camera server, so it should work in that part. Anyway it also should have wrappers for image handling, which is implemented rather differently in OS 7.0s than in OS 6.1.

    My suggestion, would be to compile 3650 (OS 6.1) versions with SDK 1.2 and for 6600 (OS 7.0s) with SDK 2.1, so they would work best in all of the available phones.

    Anyway, you would need to change the camera to CCamera for OS 7.0s and maybe do some changes on the image handling part as well.

    yucca

  4. #4
    Registered User iotuus's Avatar
    Join Date
    Apr 2005
    Posts
    11
    Thanks for the help.

    Still don't have the solution but I did use different sdk for 3650 and 6600 without finding the solution.

    I'll inform you as soon as I have the solution for the problem

  5. #5
    Regular Contributor SymbianSandy's Avatar
    Join Date
    Mar 2005
    Location
    Bangalore,India
    Posts
    306
    Can we test camera applicaton on s60 SDK2.1 emulator?
    Application works fine on SDK2.0 emulator.

    Regards
    Sandy

  6. #6
    Nokia Developer Expert symbianyucca's Avatar
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    28,671
    shouldn't be any problems, since the implementation should be excatly the same.

    yucca

  7. #7
    Regular Contributor SymbianSandy's Avatar
    Join Date
    Mar 2005
    Location
    Bangalore,India
    Posts
    306
    Are you saying that we can test camera applicaton on s60 SDK2.1 emulator?
    When I run on emulator it gives "systen error -1" i.e. "Feature not supported".

  8. #8
    Nokia Developer Expert symbianyucca's Avatar
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    28,671
    -1 is "Not Found", -5 would be "Not supported". Remove the Snap audio file playing from the code and try again, if I remember right there was an issue with the audio file name or location.

    yucca

  9. #9
    Regular Contributor SymbianSandy's Avatar
    Join Date
    Mar 2005
    Location
    Bangalore,India
    Posts
    306
    Yes sir, indeed it was problem with snap audio file.
    I disable "CreateSoundPlayerL()" and now it works in emulator too.
    So I went further to find exact bug and i found that KCameraSoundFile is assigned to wrong .wav file. It is not "Camera1a_2_8kHz.wav" but "camcordercapture.wav"
    Thanks yucca. You save my lot of time otherwise, i have to check app on mobile for slight modifications.

  10. #10
    Regular Contributor serg3d's Avatar
    Join Date
    Apr 2004
    Posts
    96
    I have no problem with camera on 6600 and emulator, but I'm using patched version of 7.0s, so called "7.0s Nokia 6600 Camera Plugin" - it is an add-on to SDK

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved