How to Save a selected frame(mask) alongwith the photo taken ??
| Tue, 2005-09-20 13:10 | |
|
Hello Guys,
I am creating a Camera Application which will give the user a chance to select from the Frames(Masks) that I am providing in the application & then capture a photo of his choice Well I am thru with the basic interface of the Camera Appl. & have also provided frames(masks)... But when I try to capture the photo alongwith the frame that I am selecting only the photo gets saved & not the frame alongwith it Inorder to provide the selected frame I have written the following code: - Code: TSize imageSize = iImage1->SizeInPixels(); TRect imageRect(TPoint(0,0), imageSize); TPoint imagepos(0,0); gc.BitBltMasked(imagepos, iImage1, imageRect, iImageMask1, EFalse); which is included in the following way inside the Draw function of the Container Class Code: CWindowGc& gc = SystemGc(); TRect drawingRect = Rect(); if ( iOffScreenBitmapCreated ) { if ( iBitmap ) //Viewfinding ongoing { DrawImage(gc, drawingRect); } else { MAknsSkinInstance* skin = AknsUtils::SkinInstance(); CFbsBitmap* bitmap = AknsUtils::GetCachedBitmap( skin, KAknsIIDQsnBgAreaMain ); if ( bitmap ) { gc.BitBlt( TPoint(0,0), bitmap); } else { // Draws bitmap with indicators on the screen TSize size( iOffScreenBitmap->SizeInPixels() ); gc.BitBlt( TPoint(0,0), iOffScreenBitmap, TRect( TPoint(0,0), size ) ); } } TSize imageSize = iImage1->SizeInPixels(); TRect imageRect(TPoint(0,0), imageSize); TPoint imagepos(0,0); gc.BitBltMasked(imagepos, iImage1, imageRect, iImageMask1, EFalse); Kindly help me out ASAP Waiting for a reply, Yogesh |
|






Forum posts: 34
Forum posts: 1233
You havn't said anything about how you combine the two images to one, and save this image, which is what you seem to be haveing problem with from your introduction.
I think everyone is just confused, it is not a difficult task.
Just make sure you save an image wich is a combination of the photo taken and the frame, and not only the photo taken.
Forum posts: 12
I try to obtain skin bitmaps on Series60 3rd edition. I linked aknskins.lib, included all the needed headers and I use the following code
CFbsBitmap* bitmap;
bitmap = AknsUtils::GetCachedBitmap(skin, KAknsIIDQsnBgScreen);
bitmap = AknsUtils::GetCachedBitmap(skin, KAknsIIDQsnBgScreenIdle);
bitmap = AknsUtils::GetCachedBitmap(skin, KAknsIIDQsnBgScreenMp);
bitmap = AknsUtils::GetCachedBitmap(skin, KAknsIIDQsnBgAreaStatus);
bitmap = AknsUtils::GetCachedBitmap(skin, KAknsIIDQsnBgAreaStatusIdle);
bitmap = AknsUtils::GetCachedBitmap(skin, KAknsIIDQsnBgAreaControl);
bitmap = AknsUtils::GetCachedBitmap(skin, KAknsIIDQsnBgAreaControlPopup);
bitmap = AknsUtils::GetCachedBitmap(skin, KAknsIIDQsnBgAreaControlIdle);
bitmap = AknsUtils::GetCachedBitmap(skin, KAknsIIDQsnBgAreaControlMp);
if(bitmap)
gc.BitBlt(Rect().iTl, bitmap, TRect(TPoint(0, 0), bitmap->SizeInPixels()));
The problem is that all that AknsUtils calls return NULL. So I cannot acces skin's wallpaper in this way.
What could be the problem?
Forum posts: 42
have you managed it ?
Txs
Tobias
Tobias.Stoeger
Forum posts: 12
iBackGround = CAknsBasicBackgroundControlContext::NewL(KAknsIIDQsnBgAreaMain, Rect(), EFalse);
Forum posts: 42
cu
Tobias
Tobias.Stoeger
Forum posts: 76
How can I get the Bitmap pointer from CAknsBasicBackgroundControlContext? I cannt see any function returning me a CFbsBitMap .. there is a Function which SupplySkinObject(EAknsCCOBackground); which returns me a TAny* and it should be TAknsBackground* ( according to docs and header file comments ). And I cannt find a single Declaration of the TAknsBackground.
can you please tell me how you achieve that?
thanks a lot in advance.
..
KiraN Puranik