×

Discussion Board

Results 1 to 6 of 6
  1. #1
    Super Contributor
    Join Date
    Jul 2008
    Posts
    2,020

    ICL and TPngEncodeData problems

    Hello folks,
    I have yet another problem with code taken more-less from the Symbian ICL reference.

    My particular code is as follows:
    Code:
            TPngEncodeData imageData= new (ELeave) TPngEncodeData;
            imageData.iBitsPerPixel=16;
            imageData.iColor=true;
            imageData.iLevel=TPngEncodeData::EDefaultCompression;
            imageData.iPaletted=false;
            
            CFrameImageData* iFrameData=CFrameImageData::NewL();
            iFrameData->AppendImageData(imageData);
    It generates the following compiler errors:
    Code:
    ..\src\mobilepaint\csaveimageao.cpp:48: function call '[TPngEncodeData].TPngEncodeData(TPngEncodeData *)' does not match
    ..\src\mobilepaint\csaveimageao.cpp:48: 'TPngEncodeData::TPngEncodeData()'
    ..\src\mobilepaint\csaveimageao.cpp:48: 'TPngEncodeData::TPngEncodeData(const TPngEncodeData &)'
    ..\src\mobilepaint\csaveimageao.cpp:55: function call '[CFrameImageData].AppendImageData({lval} TPngEncodeData)' does not match
    ..\src\mobilepaint\csaveimageao.cpp:55: 'CFrameImageData::AppendImageData(const TImageDataBlock *)' (non-static)
    
    Errors caused tool to abort.
    Does anyone of you have any ideas what is happening here? I took the code straight from the Symbian web site...
    The lines above are the best I have to offer.If anyone of you is of more advanced knowledge, I ask for your patience and understanding! - unknown arab poet
    http://www.tamoggemon.com - Symbian blog - Windows Phone blog
    My other blogs:
    webOS blog iPhone blog BlackBerry blog Samsung bada blog Android blog

  2. #2
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,734

    Re: ICL and TPngEncodeData problems

    Follow the suggestion in http://discussion.forum.nokia.com/fo...d.php?t=158079, and read those messages.

  3. #3
    Super Contributor
    Join Date
    Jul 2008
    Posts
    2,020

    Re: ICL and TPngEncodeData problems

    Hi,
    H have looked at the thread, but it is not related.

    Could you please check the URL for me?

    All the best
    Tam
    The lines above are the best I have to offer.If anyone of you is of more advanced knowledge, I ask for your patience and understanding! - unknown arab poet
    http://www.tamoggemon.com - Symbian blog - Windows Phone blog
    My other blogs:
    webOS blog iPhone blog BlackBerry blog Samsung bada blog Android blog

  4. #4
    Nokia Developer Champion
    Join Date
    Jan 2008
    Location
    Moscow, Russia
    Posts
    3,348

    Re: ICL and TPngEncodeData problems

    Try to check params which you passes to functions. See SDK documentation:
    http://www.symbian.com/developer/tec...mageData%28%29
    and
    http://www.symbian.com/developer/tec...DataClass.html
    Last edited by A.A.M.; 2009-02-08 at 20:42.

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

    Re: ICL and TPngEncodeData problems

    And, I would also look into Symbian naming conventions, most often you should not use new operators with T-Classes, and if you do, you should then thread it as a pointer I suppose..

  6. #6
    Registered User
    Join Date
    May 2006
    Location
    Germany
    Posts
    598

    Re: ICL and TPngEncodeData problems

    Actually for this specific API the T class needs to be instantiated on the heap using the new operator as CFrameImageData will then assume ownership of the pointer given to AppendImageData thus causing USER 42 panics when deleting your CFrameImageData if you passed a pointer to a stack allocated object.

    See: http://www.developer.nokia.com/Commu...Image_Encoding

Posting Permissions

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