Hi all! It's quiet easy to load jpg/png files using CMdaImageFileToBitmapUtility, and when save from bmp to jpg using CMdaImageBitmapToFileUtility there are no problems. But when trying to save BMP to PNG an error KErrNotSupported (-5) occured. Using expression like : ........................................................................................... iConverter = CMdaImageBitmapToFileUtility::NewL(*this); ((CMdaImageBitmapToFileUtility*)iConverter)->CreateL((const TDesC&)aFileName,&pngformat,&pngcodec,NULL); .......................................................................................... Is anybody knows how to fight with this?? Or PNG really not supported?
Depends what phone / OS version you are building for. On older versions of the OS it really isn't supported. On newer versions you should try using CImageDecoder / CImageEncoder instead.
I am working with symbian UIQ. AS u said I first tried to save my bitmap in bmp format as follows:
iMda = CMdaImageBitmapToFileUtility::NewL(*this);
TMda24BppBmpCodec codec;
TMdaBmpClipFormat format;
TRAPD(err, iMda->CreateL(fileName, &format, &codec, NULL));
In MiuoCreateComplete()
I am calling :
iMda->ConvertL(*iBitmap,0);
I am not getting any error but even I am not getting bmp file too. Actally I have to convert bitmap to jpeg. So, please suggest me wt would be the better idea for that.
Forum posts: 110
Forum posts: 17
I'm programming for SonyEricsson devices, not for Nokia and using Uiq 2.1
/////
Is exists an another decision for solving of this problem??
Forum posts: 26
Hi,
I am working with symbian UIQ. AS u said I first tried to save my bitmap in bmp format as follows:
iMda = CMdaImageBitmapToFileUtility::NewL(*this);
TMda24BppBmpCodec codec;
TMdaBmpClipFormat format;
TRAPD(err, iMda->CreateL(fileName, &format, &codec, NULL));
In MiuoCreateComplete()
I am calling :
iMda->ConvertL(*iBitmap,0);
I am not getting any error but even I am not getting bmp file too. Actally I have to convert bitmap to jpeg. So, please suggest me wt would be the better idea for that.
Thanks in advance.