In my application, I try to capture a image using the camera. The camera color setting is EFormatExif. So in the callback function of ImageReady(), I should convert the parameter of HBufC8* aData to CFbsBitmap, then I can process this image.
Firstly I used CImageDecoder:ataNewL and Convert to implement this function, As following codes:
iExifDecoder = CImageDecoder:ataNewL( iFs, aData->Des());
aBitmap=new (ELeave) CFbsBitmap();
iState = EExifDecoding;
iExifDecoder->Convert( &iStatus, *aBitmap );
But the tSize getting from FrameInfo is invalid. (when I tried to view the size values, it crashed). So when run to convert(), the application crashed.
Then I think DataNewL must be wrong, so I changed it to
But then when executing to this sentence, it will stop. The application just stay in the current status. I mean it did not run to the next code.
Then I changed the CImageDecoder to CBufferedImageDecoder, then if I do not add the image type and option in DataNewL, the application can finish the converting successfully. (It run to void CImageConverterEngine::RunL(), and got KErrNone). But the result image is NULL.
If I add the two parameters in DataNewL, it is the same as CImageDecoder.