How to Save a selected frame(mask) alongwith the photo taken ??

Login to reply to this topic.
Tue, 2005-09-20 13:10
Joined: 2005-08-24
Forum posts: 34
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

Fri, 2005-09-30 15:31
Joined: 2005-08-24
Forum posts: 34
Re: How to Save a selected frame(mask) alongwith the photo taken
Seems to be like no one has tried such an application OR is it that difficult ?
Fri, 2005-09-30 16:11
Joined: 2004-11-29
Forum posts: 1233
Re: How to Save a selected frame(mask) alongwith the photo taken
You have only provided information on how you draw your image and frame to screen.

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.
Fri, 2005-11-25 16:26
Joined: 2005-02-22
Forum posts: 12
AknsUtils::GetCachedBitmap() returns NULL
Hello!

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

Code:
MAknsSkinInstance* skin = AknsUtils::SkinInstance();
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?
Tue, 2006-02-07 10:52
Joined: 2004-05-21
Forum posts: 42
Re: How to Save a selected frame(mask) alongwith the photo taken
Hello sono,
have you managed it ?
Txs
Tobias

Tobias.Stoeger

Tue, 2006-04-04 13:24
Joined: 2005-02-22
Forum posts: 12
Re: How to Save a selected frame(mask) alongwith the photo taken
Yes, I did a long time ago with

Code:
CFbsBitmap* iBackGround;
iBackGround = CAknsBasicBackgroundControlContext::NewL(KAknsIIDQsnBgAreaMain, Rect(), EFalse);
Tue, 2006-04-04 13:27
Joined: 2004-05-21
Forum posts: 42
Re: How to Save a selected frame(mask) alongwith the photo taken
Thank you for that information. Wink
cu
Tobias

Tobias.Stoeger

Wed, 2006-06-28 13:57
Joined: 2005-06-01
Forum posts: 76
Re: How to Save a selected frame(mask) alongwith the photo taken
Hi Tobias and Sono,

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
  • Login to reply to this topic.