×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Jan 2005
    Posts
    26

    Post How Can I draw faster bitmap to screen

    My program is a socket app.I take jpges continiously from localhost to my emulator.And when frame recieve I draw it to emulator screen.But it draw nearly 3 frame per second.It really slow.How can I draw faster bitmap to screen.
    my code like this:
    //socketnegine.cpp
    void CSocketsEngine::ConstructL()
    {
    .........
    iMdaImageDescToBitmapUtility=CMdaImageDescToBitmapUtility::NewL(*this);
    iBitmap = new (ELeave) CFbsBitmap();
    iBitmap->Create(TSize(110,130), EColor64K);
    ......
    }
    void CSocketsEngine::ResponseReceived( const TDesC8& aBuffer )
    {
    .....//image recieving ends.
    TDesC8& ides=(TDesC8&) iResimBuffer;
    iMdaImageDescToBitmapUtility->OpenL(ides);
    .....................
    }

    void CSocketsEngine::MiuoCreateComplete(TInt /*aError*/)
    {

    };

    void CSocketsEngine::MiuoOpenComplete(TInt aError)
    {
    if( aError != KErrNone )
    {
    //
    }
    TInt frameCount = iMdaImageDescToBitmapUtility->FrameCount();
    if( frameCount == 0 )
    {
    //
    }

    TFrameInfo frame;
    iMdaImageDescToBitmapUtility->FrameInfo(0, frame);
    iMdaImageDescToBitmapUtility->ConvertL(*iBitmap);
    }

    void CSocketsEngine::MiuoConvertComplete(TInt aError)
    {
    TBuf16<50> savingpath;
    if( aError == KErrNone )
    {
    _LIT(savingpathLIT,"c:\\System\\Apps\\calismalar\\gelenresimler\\");
    savingpath.Append(savingpathLIT);
    savingpath.Append(imagenumber);
    savingpath.Append(_L(".bmp"));
    iBitmap->Save(savingpath);
    iMdaImageDescToBitmapUtility->Close();
    iContainer.DrawNow(); ///drawing image
    imagenumber.Zero();
    iBitmap->UnlockHeap(EFalse);
    savingpath.Zero();
    .................
    }
    }

    //container
    void CcalismalarContainer:: Draw(const TRect& aRect) const
    {
    CWindowGc& gc = SystemGc();

    if(iCurrentOutlineId==EDrawingScreen)
    {
    _LIT(savingpathLIT,"c:\\System\\Apps\\calismalar\\gelenresimler\\"); savingpath.Append(savingpathLIT);
    savingpath.Append(iSocketEngine->imagenumber);
    savingpath.Append(_L(".bmp"));
    iBitmap->Load(savingpath);
    savingpath.Zero();
    gc.BitBlt(TPoint(30,5),iBitmap);
    iBitmap->UnlockHeap(EFalse);
    }
    Last edited by yakoc; 2005-12-19 at 12:13.

  2. #2
    Registered User
    Join Date
    Aug 2005
    Posts
    20

    Re: How Can I draw faster bitmap to screen

    Hello. Maybe use DSA(direct screen acces) and off screen bitmap?

Similar Threads

  1. draw bitmap in the whole screen
    By MMorpheus in forum Symbian User Interface
    Replies: 5
    Last Post: 2005-12-28, 08:41
  2. problem on copy from a bitmap and draw to the screen
    By ceehira in forum Symbian Media (Closed)
    Replies: 1
    Last Post: 2005-08-24, 12:46
  3. Help !about .mbm的形成
    By wangguoshui in forum Symbian
    Replies: 4
    Last Post: 2004-12-23, 03:37
  4. Replies: 2
    Last Post: 2004-08-04, 09:48
  5. Draw on screen from background application
    By dancom in forum Symbian C++
    Replies: 2
    Last Post: 2003-05-26, 12:37

Posting Permissions

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