×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Regular Contributor
    Join Date
    Dec 2007
    Posts
    50

    Unhappy Images seems very dark on 3rd edition FP2 phones

    Hi,
    I'm trying to display animations on my phone.

    I use mmp file as a resource file and display images by drawing them on a backbuffer.

    On phones running Symbian 3,3.1 (N73,N95) the animations are displayed perfectly.

    On phones running Symbian 3.2 (3rd edition feature pack 2, like N78, 6210) the animations seems very dark - you can hardly see red and blue colors.

    When I take the same bmp files that I use in the animation, copy them to the device and display them with the built-in picture viewer they look good.

    My guess is that is something to do with the display mode.
    this is how I create the back buffer objects:


    Code:
    TDisplayMode aDisplayMode = iScreenDevice->DisplayMode();
    m_pBackBufferBitmap = new(ELeave) CFbsBitmap();
    User::LeaveIfError(m_pBackBufferBitmap->Create(*m_pWindowSize, aDisplayMode) );
    m_pBackBufferDevice = CFbsBitmapDevice::NewL(m_pBackBufferBitmap);
    User::LeaveIfError(m_pBackBufferDevice->CreateContext(m_pBackBufferGc));
    m_pBackBufferGc->SetBrushStyle(CGraphicsContext::ENullBrush);

    Does anyone know what why this happens and how can I solve it?



    Thanks,
    Asaf Pinhassi.

  2. #2
    Registered User
    Join Date
    Dec 2006
    Posts
    2,280

    Re: Images seems very dark on 3rd edition FP2 phones

    Hi,

    What format are the animations in?

    What you can try to do is open the images in their native display mode rather than convert to the screen display mode (assuming these are different of course and also assuming you are using CImageDecoder). They will get converted when you blit the bitmaps of course, but this will be done by a different bit of software.

    You are probably right about the display mode, it will almost certainly be the color space conversion that is causing the problem.

    Sorcery

  3. #3
    Regular Contributor
    Join Date
    Dec 2007
    Posts
    50

    Unhappy Re: Images seems very dark on 3rd edition FP2 phones

    I use 24bit bitmaps.
    I load them as follows:
    Code:
    CFbsBitmap* CImageLoader::LoadImageFromMBM(const TDesC& aMBMFile, TInt aPos)
    {
    	CFbsBitmap* pBMP = new (ELeave) CFbsBitmap();
    	CleanupStack::PushL(pBMP);
    	User::LeaveIfError(pBMP->Load(aMBMFile, aPos, EFalse));
    	CleanupStack::Pop();	
    	return pBMP;
    }

    But I noticed something else - My app is composed of UI component and a daemon. I found out that the problem occurs only in the window created by the daemon. I compared the windows settings and they look pretty much the same (display mode etc.)

    The daemon window is created as follows:

    Code:
    	User::LeaveIfError(iWsSession.Connect());
    
    	iScreenDevice = new (ELeave) CWsScreenDevice(iWsSession);
    	User::LeaveIfError(iScreenDevice->Construct());
    	User::LeaveIfError(iScreenDevice->CreateContext(iWindowGc));
    
    	iWindowGroup=RWindowGroup(iWsSession);
    	User::LeaveIfError(iWindowGroup.Construct((TUint32)&iWindowGroup, EFalse));
    	iWindowGroup.SetOrdinalPosition(0, ECoeWinPriorityAlwaysAtFront);
    	iWindowGroup.EnableReceiptOfFocus(EFalse);
    
    	CApaWindowGroupName* winGroupName=CApaWindowGroupName::NewLC(iWsSession);
    
    	winGroupName->SetHidden(ETrue);
    	winGroupName->SetWindowGroupName(iWindowGroup);
    	CleanupStack::PopAndDestroy();
    
    	iWindow=RWindow(iWsSession);
    	User::LeaveIfError(iWindow.Construct(iWindowGroup, (TUint32)&iWindow));
    	iWindow.SetNonTransparent();
    	
    	iWindow.EnableVisibilityChangeEvents();
    	iWindow.SetVisible(EFalse);
    
    	int winWidth = 240;
    	int winHeight = 120 + Y_OFFSET_IN_WINDOW;
    	m_pWindowSize = new TSize(winWidth, winHeight);
    	m_pPosition = new TPoint(0, 80);
    
    
    	iWindow.SetExtent(*m_pPosition, *m_pWindowSize);
    	iWindow.SetBackgroundColor(KRgbBlack);
    	iWindow.SetNonFading(true);
    Can you see the problem?

  4. #4
    Registered User
    Join Date
    Dec 2006
    Posts
    2,280

    Re: Images seems very dark on 3rd edition FP2 phones

    Sorry, I missed this reply....

    I'm afraid I can't see the problem. I can only suggest you experiment with the settings or try to get a look at all of the settings in the debugger and see if you can find what the differences are.

    Sorcery

  5. #5
    Regular Contributor
    Join Date
    Dec 2007
    Posts
    50

    Thumbs up Re: Images seems very dark on 3rd edition FP2 phones

    I found the problem - I drew the bitmaps using BitBltMasked with incorrect mask.
    I still don't know why the problem was only on FP2 devices.

    Thanks Anyway,
    Asaf.

Similar Threads

  1. TAiwDialDataV1 and TAiwDialDataV1Pckg not working in 3rd edition FP2
    By lss0986 in forum Symbian Networking & Messaging (Closed)
    Replies: 3
    Last Post: 2008-12-16, 08:27
  2. How to get imei and cell id in nokia S60 3rd edition phones in j2me
    By bfchaudharimca in forum Mobile Java Networking & Messaging & Security
    Replies: 3
    Last Post: 2008-09-25, 13:56
  3. Replies: 1
    Last Post: 2008-05-01, 08:08
  4. Audio recording in Nokia S40 3rd Edition FP2 Emulator
    By anant_vk in forum Mobile Java Tools & SDKs
    Replies: 0
    Last Post: 2007-12-21, 18:10

Posting Permissions

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