Discussion Board

Results 1 to 7 of 7
  1. #1
    Registered User indianstud2k2's Avatar
    Join Date
    Dec 2004
    Posts
    9
    hi,
    how do i convert mutilple images (.png/.jpeg/gif) by using CMdaImageFileToBitmapUtility... I am able to convert only 1 image .. but wat i do if i want to convert 50 images simultaneously .
    Tannkx in advance,
    Ashu

  2. #2
    Nokia Developer Expert symbianyucca's Avatar
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    28,664
    the CMdaImageFileToBitmapUtility., is using the application tread, so it makes not too much sence to make the conversions concurrently., you get it dome same time (or maybe even faster) by converting them consecutively.

    Is there any real problems that would really be solved, by doing the conversions concurrently ?

    yucca

  3. #3
    Registered User indianstud2k2's Avatar
    Join Date
    Dec 2004
    Posts
    9
    Well thankx for ur prompt reply ....The code given below works fine for converting a png into bitmap . if i want to convert multiple png's then wat shud i do.. ... as u said tht it works over application thread so i must have to include active objects or wat ??? .. can u tell me through an example code ...
    ..................................................................................................

    void CPngsupContainer::ConstructL(const TRect& aRect)
    {

    CreateWindowL();
    SetRect(aRect);
    ActivateL();
    Filearray = new (ELeave) CDesC16ArrayFlat(2);
    ReadPngTxt(); //ReadFile();
    iBitmap = new (ELeave) CFbsBitmap();
    OpenImage();
    }
    void CPngsupContainer::OpenImage()
    {


    iScaler = CMdaBitmapScaler::NewL();

    iConverter = CMdaImageFileToBitmapUtility::NewL(*this);

    iConverter->OpenL(ReadFileItems(h));


    }

    void CPngsupContainer::MiuoOpenComplete(TInt aError)
    {

    TFrameInfo frameInfo;

    //Get the frame info

    iConverter->FrameInfo(KGifFrameIndex,frameInfo);
    frameInfo.iFlags=TFrameInfo::ETransparencyPossible;
    TInt err = iBitmap->Create(frameInfo.iOverallSizeInPixels,KDeviceColourDepth);

    TRAPD(convertErr,iConverter->ConvertL(*iBitmap,KGifFrameIndex));
    }
    void CPngsupContainer::MiuoConvertComplete(TInt aError)
    {
    TRAPD(err1,iScaler->ScaleL(*this,*iBitmap,iBitmap->SizeInPixels()));

    }




    regards,
    ashu

  4. #4
    Registered User indianstud2k2's Avatar
    Join Date
    Dec 2004
    Posts
    9
    i am trying to make a resource file for loading png's exaclty like mbm with masking support through code itself . i loaded all the pngs into tht file and want to convert all the pngs into bmp so tht i can use them ne where in my code . i have made multiple instances of CFbsBitmap and loaded all the images into tht CFbsBitmap array ....But the prob wat i m getting is tht i cud not b able to convert all the images ... can u suggest me how do i convert them concurrently ......
    Thnakx,
    Ashu

  5. #5
    Registered User indianstud2k2's Avatar
    Join Date
    Dec 2004
    Posts
    9
    Thankx Alot yucca .. now i can use my any bitmap file as MBM
    regards,
    Ashu

  6. #6
    Regular Contributor lilesh's Avatar
    Join Date
    Nov 2004
    Posts
    72
    Hello inidianstud

    Even i want to display a lot of png files in my application.
    Can u help me with that. Plz do .
    Can you send me a sample code of that.

    My id : lilesh_patel@yahoo.com
    lilesh.patel@gmail.com

    or paste ur code snipplet here .

    Thanks and regards ,
    Lilesh.

  7. #7
    Regular Contributor Rx-lee's Avatar
    Join Date
    Feb 2004
    Posts
    130
    hi indianstud2k2,

    i have problem loading multiple images also.
    can u post me ur codes?

    my email: rx_8888@yahoo.com

    thanks in advance,
    Ronald

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved