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)
{
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)
{
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.
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".
Re: Saving Camera image will not work in 6600 but it does in 3650
2005-12-23, 04:59#8
-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
Re: Saving Camera image will not work in 6600 but it does in 3650
2005-12-23, 05:28#9
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.
Re: Saving Camera image will not work in 6600 but it does in 3650
2006-01-01, 09:02#10
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