can someone explain how to use CImageDecoder to create thumbnails for a list of JPGs? Or should a different class be used to perform this job?
// Create the CFbsBitmap with the thunbmail size
iBitmap = CFbsBitmap::NewL();
// Create the decoder
// CImageDecoder *iDecoder
iDecoder = NULL;
iDecoder = CImageDecoder::FileNewL(iFs, _L("e:\\file.jpg"));
// This is asynchronous, you have to do rest of the part in RunL
Actually, in symbian 2.x, you can use CPAlbImageData of album class to get the image thumbnail, and in 3.0, you can use gallery class to get the thunbmail
Thanks for the answer. Actually I was hoping on some suggestion which would run a bit faster . Creating thumb nails using CImageDecoder will work for me (I think/hope). Currently I am using the MGFetch 3.0 Gallery class. On the emulator it works fine (PlatSec turned OFF). On N91 it complains that it needs DRM capability. Documentation states that this is only required if you access DRM proteced content. I do not. As a consequence I am now stuck in my planning for the application as I have to create a MGFetch-like class myself (can I invoice Nokia for this ?).
Use CImageDecoder should be slower, unless you save the thunbmail, and next time, you just load the thumbnail and donot try to decode and resize again. Album class in 2.x is very fast and stable, but you cannot find it in 3.x. I hvnot tried the gallery way to get thunbmail, by right, it should be faster. The platform will generate the thumbnail, and the gallery class might just load the thumbnail. You can find some discussion about gallery method in this forum.
any idea what is happening ? If I do:
TSize size(42, 42);
to create the thumbnail I get KErrArgument (-6) in RunL after calling
If I try to Convert the JPG with its original size it works OK. The documentation only mentions KErrUnderflow and recommends to call ContinueConvert() in that case. ContinueConvert() in my case (KErrArgument) causes a crash.