×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Regular Contributor
    Join Date
    Nov 2003
    Posts
    145

    Blending two Bitmaps

    hi folks,

    got to blend two bitmaps. Say I have two bitmaps, iBmp1(a picture) and iBmp2(a frame).

    here suppose iBmp1(or picture) has a resolution 800x600. but iBmp2(frame) is 176x208 image. Now I want to blend frame (iBmp) with picture (iBmp2). Do need to use scaling operation ?


    please advicd.

    regards
    dotcdotc

  2. #2
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,169

    Re: Blending two Bitmaps

    you could try something like this:

    CFbsBitmapDevice* bitmapDevice = CFbsBitmapDevice::NewL(BigBit);
    CleanupStack::PushL(bitmapDevice);

    CFbsBitGc* graphicsContext = NULL;
    User::LeaveIfError(bitmapDevice->CreateContext(graphicsContext));
    CleanupStack::PushL(graphicsContext);

    // use graphicsContext here to draw frame to the BigBit

    CleanupStack::PopAndDestroy(2);//graphicsContext,bitmapDevice,

    yucca

  3. #3
    Regular Contributor
    Join Date
    Nov 2003
    Posts
    145

    Re: Blending two Bitmaps

    thankyou yucca, It did get the job done. The code you have given blends the image but question is that the picture bitmap is of higher resolution (640x480) than the Frame bitmap resolution (176x208). So the frame doesn't gets fit on the picture. Do I need to use some scaling operation on frame or should I use 640x480 resolution frame which will take lots memory and probably limits the no. of frames I can put in my application.

    please advice.

    regards,
    dotcdotc

  4. #4
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,169

    Re: Blending two Bitmaps

    you could use the drawing function offered by graphicsContext, with them you can select the source & destination rects, and they will scale the image to fit, so no need to use any other scaling functionality, also the target can be any size.

    yucca

Similar Threads

  1. Array of bitmaps
    By tvdgeer in forum Symbian
    Replies: 4
    Last Post: 2005-10-05, 08:07
  2. ERROR: RCMake failed: (Bitmaps): bmconv.exe failed with code 5
    By Dexterp37 in forum Symbian Tools & SDKs
    Replies: 5
    Last Post: 2005-09-07, 08:53
  3. display masked AND scaled bitmaps
    By michael.schrenk in forum Symbian Media (Closed)
    Replies: 2
    Last Post: 2005-01-13, 14:53
  4. Navigating through Bitmaps using JoyStick
    By amitaggarwal in forum Symbian User Interface
    Replies: 0
    Last Post: 2004-12-15, 05:40
  5. Bitmaps array
    By dj2five in forum Symbian
    Replies: 0
    Last Post: 2004-01-28, 14:12

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×