×

Discussion Board

Results 1 to 6 of 6
  1. #1
    Registered User
    Join Date
    May 2008
    Posts
    15

    Troubles using Image.open in the emulator

    Hi everyone,

    Im currently using the S60 Developper Tools 3rd Edition SDK Emulator, and I updated the Emulator with the PythonForS60_1_4_3_SDK_3rdEd package. As I read in the documentation, the Graphics modul should work without any problem. But I cannot open any jpg image using:

    bgimage=Image.open("c:\\data\\images\\pictures\\logo.jpg")

    I tried different format, with '' or with u"" but doesnt work either. So is it a problem in my code, or the emulator doesnt support this?!?

    I even tried with a short path like and putting my file directly into the path where the script is executed?

    bgimage=Image.open("logo.jpg")

    I get the error:
    File "c:\resource\graphics.py", line 76 [...]
    SymbianError:[Errno -20]
    KErrNotFound

    And the worse in that problem is that it works perfectly fine on the Nokia N95...


    Thanks to anyone helping me on that!

    fran

  2. #2
    Nokia Developer Champion
    Join Date
    Feb 2008
    Location
    Ahmedabad, Gujarat, India
    Posts
    3,852

    Re: Troubles using Image.open in the emulator

    hi qcalv again
    i have earlier tried this image open function in my 2nd edition FP2 and at that time it worked for me.
    And i hope it should work for your case as well. can tell the dibo what error message did you get.

  3. #3
    Super Contributor
    Join Date
    Oct 2007
    Location
    Deva, Romania
    Posts
    3,471

    Re: Troubles using Image.open in the emulator

    OK, I've tried it on S60 3rd ed. FP1 SDK with PyS60 1.4.3 and it works. It opens the image (I stored it in "c:\\data\\images\\pictures\\logo.jpg", but that shouldn't matter).
    It also shouldn't matter if you used 3rd ed. SDK withou FP1.

  4. #4
    Super Contributor
    Join Date
    Mar 2003
    Location
    Espoo, Finland
    Posts
    976

    Re: Troubles using Image.open in the emulator

    Quote Originally Posted by qcalv View Post
    bgimage=Image.open("c:\\data\\images\\pictures\\logo.jpg")
    That path is not an absolute Windows path, but a relative emulator path. Your emulator C-drive is located somewhere deep inside c:\Symbian installation. For example mine is at:

    C:\Symbian\9.1\S60_3rd_MR\Epoc32\winscw\c
    That means I would have to save your image at:

    C:\Symbian\9.1\S60_3rd_MR\Epoc32\winscw\c\data\images\pictures\logo.jpg
    Just to make sure you realized this

    --jouni

  5. #5
    Registered User
    Join Date
    May 2008
    Posts
    15

    Wink Re: Troubles using Image.open in the emulator

    Hi JOM!

    Very weird thing, I tried that as well, I saved the picture exactly where you said, because I guessed so too: the emulator was using not the usual windows path. But it didnt work. However I probably made a mistake in the syntax at that time, or not. Well Ive no clue, all I know is that yesterday when I tried again at home, it worked!!

    So the best thing to do, when playing with pictures, is to put them there. Thank u

    fran

  6. #6
    Nokia Developer Champion
    Join Date
    Feb 2008
    Location
    Ahmedabad, Gujarat, India
    Posts
    3,852

    Re: Troubles using Image.open in the emulator

    hi fran great you were sucessful in getting your work done thanks to jouni he has correctly pointed the mistake.

Similar Threads

  1. How To Make The S60 Emulator See My USB Bluetooth Dongle ?
    By Mo7ammed_01 in forum Bluetooth Technology
    Replies: 9
    Last Post: 2009-07-17, 02:33
  2. Replies: 21
    Last Post: 2008-06-25, 20:21
  3. Carbide.vs emulator hangs when debugging
    By jyrkiettila in forum Symbian Tools & SDKs
    Replies: 14
    Last Post: 2008-02-26, 17:22
  4. Emulator to Emulator Bluetooth routing using NCF
    By letronje in forum Symbian Tools & SDKs
    Replies: 11
    Last Post: 2007-04-18, 13:41
  5. How To Make The S60 Emulator See My USB Bluetooth Dongle ?
    By Mo7ammed_01 in forum Symbian Networking & Messaging (Closed)
    Replies: 1
    Last Post: 2006-07-25, 00:12

Posting Permissions

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