×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Dec 2004
    Posts
    8

    Copying a Bitmap using DataAddress() of another Bitmap and Displaying it

    Hi All
    I had a problem with displaying a Bitmap, after copying the contents using memcpy() function. the Display mode is EColor64K.
    What i am doing is
    //First Bitmap
    CFbsBitmap* bitmap = new (ELeave) CFbsBitmap;
    bitmap->Reset();
    User::LeaveIfError(bitmap->Load(KTestBmp));
    TSize size = bitmap->SizeInPixels();

    //Second Bitmap
    CFbsBitmap* bitmap2 = new (ELeave) CFbsBitmap;
    bitmap2->Reset();
    User::LeaveIfError(bitmap2->Create(size, EColor64K));

    TUint16* testData = (TUint16*)bitmap->DataAddress();
    TUint16* dstData = (TUint16*)bitmap2->DataAddress();
    memcpy(dstData,testData,size.iWidth*size.iheight);

    Now i tried to dislay the second Bitmap but the image is not proper,
    It's some junk display.
    I even compared both the DataAddress values using Mem::Compare()
    the values are correct.
    please help me if u have any reason for this.

    thanks in Advance
    Kilmer

  2. #2
    Regular Contributor
    Join Date
    Aug 2004
    Posts
    295

    Re: Copying a Bitmap using DataAddress() of another Bitmap and Displaying it


  3. #3
    Registered User
    Join Date
    Dec 2004
    Posts
    8

    Re: Copying a Bitmap using DataAddress() of another Bitmap and Displaying it

    Hi All
    thank for the info..
    I fixed it...
    yes, there was a mistake while converting the BMP file to MBM file.
    I was using BMCONV.EXE with out specifying the "/n" option, which help in converting the bmp without any compression techniques.

    So i was working on the wrong data ie compressed data, not the exact data.
    Now i fixed it..

    Thank for your co-operation
    val_kilmer

Similar Threads

  1. Displaying of Raw Bitmap data in the Display
    By gilly_kumar in forum Symbian
    Replies: 2
    Last Post: 2005-10-10, 18:42
  2. Displaying bitmap on a container
    By Shaikuny in forum Symbian User Interface
    Replies: 1
    Last Post: 2005-01-03, 11:07
  3. displaying bitmap faild ;(
    By sblider in forum Symbian
    Replies: 8
    Last Post: 2004-02-11, 08:07
  4. Fast Displaying Bitmap
    By yfho in forum Symbian
    Replies: 2
    Last Post: 2003-09-26, 16:39
  5. displaying scalled bitmap with mask
    By tomek300 in forum Symbian
    Replies: 0
    Last Post: 2003-07-21, 15:58

Posting Permissions

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