×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Regular Contributor
    Join Date
    Sep 2009
    Posts
    285

    CImageDecoder : Closing image

    Hi!

    I am using the CImageDecoder class to read a jpeg image into a bitmap.
    Code:
    	CImageDecoder* idec = CImageDecoder::FileNewL(fs,_L("d:\\test.jpg"),_L8("image/jpeg"),CImageDecoder::EOptionAlwaysThread);
    The converting into the bitmap works fine.

    At the end of the code, I call the destructor-
    Code:
    idec->~CFbsBitmap();
    However, the file still appears to be open. If I try to delete the file, I get a permission error saying that the file is open.
    How can I close the file so that I can delete it?

    Thanks
    Kedar

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

    Re: CImageDecoder : Closing image

    That is cute, but
    Code:
    delete idec;
    would make more sense.

  3. #3
    Regular Contributor
    Join Date
    Sep 2009
    Posts
    285

    Re: CImageDecoder : Closing image

    Quote Originally Posted by wizard_hu_ View Post
    That is cute, but
    Code:
    delete idec;
    would make more sense.
    Hi Wizard_Hu_,

    The first thing I tried was
    Code:
    delete idec
    , but I was having the problem.

    Basically, I have written a Symbian C++ extension for Python. During the image processing phase, I read the jpeg image into a bitmap. However, after the function is over, if I try and delete the jpeg file, I get a -
    Permission Error
    If by deleting idec, the image file should be released, then maybe I should hunt elsewhere to find the cause of the problem.

    Thanks
    Kedar

  4. #4
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,672

    Re: CImageDecoder : Closing image

    I do not think that a deleted encoder object would keep the file open. Do you do anything with the file prior to deleting it?

Similar Threads

  1. J2ME Scaling big JPEG files on S60 5th ed and CS001269
    By m1ha3l in forum Mobile Java Media (Graphics & Sounds)
    Replies: 14
    Last Post: 2010-04-06, 07:05
  2. NullPointerException when using retreived Image
    By emdiesse in forum Mobile Java General
    Replies: 3
    Last Post: 2010-03-19, 18:13
  3. Image Transparency issue - Help me out ....
    By tomcruise in forum Mobile Java Games
    Replies: 2
    Last Post: 2008-05-31, 15:40
  4. Nokia Image Converter
    By davidpurdie in forum General Development Questions
    Replies: 0
    Last Post: 2004-02-18, 15:31
  5. image failed to load
    By killarkai in forum Mobile Java Media (Graphics & Sounds)
    Replies: 4
    Last Post: 2003-07-25, 13:07

Posting Permissions

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