You Are Here:

Community: Developer Discussion Boards

#1 Old Troubles using Image.open in the emulator - 2008-05-05, 17:08

Join Date: May 2008
Posts: 15
qcalv
Offline
Registered User
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
Reply With Quote

#2 Old Re: Troubles using Image.open in the emulator - 2008-05-05, 17:18

Join Date: Feb 2008
Posts: 2,542
Location: Bhavnagar, Gujarat, India
Send a message via Yahoo to gaba88 Send a message via Skype™ to gaba88
gaba88's Avatar
gaba88
Offline
Forum Nokia Champion
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.


Gargi Das- http://gargidas.blogsot.com

Forum Nokia Python Wiki


Learn Python at http://mobapps.org/PyS60
Reply With Quote

#3 Old Re: Troubles using Image.open in the emulator - 2008-05-05, 17:35

Join Date: Oct 2007
Posts: 2,841
Location: Deva, Romania
bogdan.galiceanu's Avatar
bogdan.galiceanu
Online
Forum Nokia Champion
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.
Reply With Quote

#4 Old Re: Troubles using Image.open in the emulator - 2008-05-07, 11:56

Join Date: Mar 2003
Posts: 936
Location: Espoo, Finland
JOM's Avatar
JOM
Offline
Forum Nokia Champion
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:

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

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

--jouni
Reply With Quote

#5 Old Wink Re: Troubles using Image.open in the emulator - 2008-05-07, 16:28

Join Date: May 2008
Posts: 15
qcalv
Offline
Registered User
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
Reply With Quote

#6 Old Re: Troubles using Image.open in the emulator - 2008-05-07, 18:59

Join Date: Feb 2008
Posts: 2,542
Location: Bhavnagar, Gujarat, India
Send a message via Yahoo to gaba88 Send a message via Skype™ to gaba88
gaba88's Avatar
gaba88
Offline
Forum Nokia Champion
hi fran great you were sucessful in getting your work done thanks to jouni he has correctly pointed the mistake.


Gargi Das- http://gargidas.blogsot.com

Forum Nokia Python Wiki


Learn Python at http://mobapps.org/PyS60
Reply With Quote
Reply « Previous Thread | Next Thread »
Display Modes
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules

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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump
Similar Threads
Thread Thread Starter Forum Replies Last Post
How To Make The S60 Emulator See My USB Bluetooth Dongle ? Mo7ammed_01 Bluetooth Technology 9 2009-07-17 03:33
Configuring proper networking in S60 3rd Ed emulator (NOT Winsock!) sysctl Symbian Tools & SDKs 21 2008-06-25 21:21
Carbide.vs emulator hangs when debugging jyrkiettila Symbian Tools & SDKs 14 2008-02-26 18:22
Emulator to Emulator Bluetooth routing using NCF letronje Symbian Tools & SDKs 11 2007-04-18 14:41
How To Make The S60 Emulator See My USB Bluetooth Dongle ? Mo7ammed_01 Symbian Networking & Messaging 1 2006-07-25 01:12

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia 
RDF Facets: qdcZidentifierQSxhttpE3aE2fE2fdiscussionE2eforumE2enokiaE2ecomhttpE3aE2fE2fdiscussionE2eforumE2enokiaE2ecomE2fforumE2fshowthreadE2ephpE3ftE3d81449X qdcZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qdcZtypeQUqfntypeZCommunityContentQ qdcZtypeQUqfntypeZE44iscussionQ qdcZtypeQUqfntypeZE44iscussionContentQ qdcZtypeQUqfntypeZE52esourceQ qdcZtypeQUqfntypeZWebpageQ qdcZtypeQUqmarsZManagedE52esourceQ qdcZtypeQUqwebZInformationE52esourceQ qdcZtypeQUqwebZPageQ qdcZtypeQUqwebZE52esourceQ qdcZtypeQUqrdfsZE52esourceQ qfnZtopicQUqfnTopicZpythonQ qfnZtypeQUqfntypeZCommunityContentQ qfnZtypeQUqfntypeZE44iscussionQ qfnZtypeQUqfntypeZE44iscussionContentQ qfnZtypeQUqfntypeZE52esourceQ qfnZtypeQUqfntypeZWebpageQ qfnZuserE5ftagQSxpythonX qmarsZlanguageQUxhttpE3aE2fE2fswE2enokiaE2ecomE2flanguageE2d1E2fenX qrdfZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qrdfZtypeQUqfntypeZCommunityContentQ qrdfZtypeQUqfntypeZE44iscussionQ qrdfZtypeQUqfntypeZE44iscussionContentQ qrdfZtypeQUqfntypeZE52esourceQ qrdfZtypeQUqfntypeZWebpageQ qrdfZtypeQUqmarsZManagedE52esourceQ qrdfZtypeQUqwebZInformationE52esourceQ qrdfZtypeQUqwebZPageQ qrdfZtypeQUqwebZE52esourceQ qrdfZtypeQUqrdfsZE52esourceQ