×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Regular Contributor
    Join Date
    Aug 2003
    Location
    Italy
    Posts
    54

    Problem: Photo application. Works on Nokia 7650, not on 6600

    Hi!!

    I have this problem.
    Starting from Snapshot example ( C:\Symbian\6.1\Series60\Series60Ex\snapshot\ ) I created an application wich take photo from the camera and save it with this name format:

    IMEI-date(dd/mm/aa)-hour(hh:mm:ss).jpg

    So every photo as an unique name.

    This application works on 7650 without problem.
    Works on 3650 too.
    On 6600 doesn't work the part that save the image.

    In other words, both on 7650 and 6600 it show me the image of the camera.
    When I call the fuction to save the image the program didn't crash in both the device.
    It seems that it's all ok.

    But when I use FExplorer on the 7650 to look at the image on the 7650 the image has been saved, and everything is ok.

    In the 6600 this what happend.
    * The File with the name IMEI-date(dd/mm/aa)-hour(hh:mm:ss).jpg is create but it's 0 kb size.
    * It's has a strange icon (like the notepad one on windows)
    * It's completly empty
    * When I try to open it the Nokia start "Notepad" and it show me the paper empty
    * If I try to send this file via Bluetooth it answer me "Impossible to Send!"

    What's wrong ?? This is the saving code:

    =|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|

    homeTime.HomeTime();

    _LIT(KFormatTxt,"%/0%1%/1%2%/2%3%/3 %-B%:0%J%:1%T%:2%S%:3%+B");
    homeTime.FormatL(buf,KFormatTxt);

    TBuf <64> dirnomefile;

    TInt iYear;
    TInt iDay;
    TInt iMonth;

    iGiorno = StringToInt(buf.Mid(0,2));
    iMese = StringToInt(buf.Mid(3,2));
    iYear = StringToInt(buf.Mid(6,4));

    TInt iHour;
    TInt iMinute;
    TInt iSecond;

    iHour = StringToInt(buf.Mid(11,2));
    iMinute = StringToInt(buf.Mid(14,2));
    iSecond = StringToInt(buf.Mid(17,2));

    GetImei(ImeiCode);

    dirnomefile.Format(_L("\\%S-%02d-%02d-%04d-%02d-%02d-%02d.jpg"), &ImeiCode, iDay, iMonth, iYear, iHour, iMinute, iSecond);

    TFileName newFilePathAndName(dirnomefile);
    // The Filename is IMEI-date-hour.jpg, so
    // it's impossible to have file with the same
    // name..

    // Create Format and Codec

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

    TMdaPackage* codec = NULL;
    CleanupStack::PushL(codec);

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

    //iSavingImage = ETrue; // set flag, can't take new pictures when saving

    CleanupStack::PopAndDestroy(1); // codec

    // After the photo is saved the window disappear..
    TRect rc(0,0,1,1);
    SetRect(rc);

  2. #2
    Nokia Developer Champion
    Join Date
    Mar 2004
    Location
    Czech Republic
    Posts
    2,037
    Nokia is running on Symbian 6.1, but 6600 uses version 7.0. Between those verisons was multimedia architecture revisited and improved. So If you use Multi Media Server you had to change you code, some changes are also in Photo Album View and in Camera API there was also some partial changes...

    Bye, STeN

Posting Permissions

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