×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Registered User
    Join Date
    Feb 2008
    Posts
    21

    screenshot not possible

    hi,

    I have following methods which I request/trigger over http-request:

    def take_photo():
    img = camera.take_photo(size = (640,480))
    size = 480, 320
    image = img.resize(size)
    image.save(PICTURE_FILE)
    return file(PICTURE_FILE).read()

    def screenshot():
    img = graphics.screenshot()
    size = 480, 320
    image = img.resize(size)
    img.save(SCREENSHOT_FILE)
    return file(SCREENSHOT_FILE).read()

    first works fine and I am able to display the taken picture on the html website. BUT the second throws the following error on the phone:
    Progr.geschl.:
    HttpdMain
    KERN-EXEC 3

    any ideas why I get this error? THX for help!
    regards,
    Askin

  2. #2
    Nokia Developer Expert
    Join Date
    Mar 2003
    Posts
    457

    Re: screenshot not possible

    Quote Originally Posted by _Askin_ View Post
    ...
    def screenshot():
    img = graphics.screenshot()
    size = 480, 320
    image = img.resize(size)
    img.save(SCREENSHOT_FILE)
    return file(SCREENSHOT_FILE).read()
    ...
    BUT the second throws the following error on the phone:
    Progr.geschl.:
    HttpdMain
    KERN-EXEC 3

    any ideas why I get this error?
    This is caused by the Python environment, when running in the context of the web-server, being slightly different than the Python environment when running in the context of a UI application. Specifically (if you are versed in the S60 C++ API), when running under the web-server, there is no CCoeEnv instance.

    The implementation of some component in that screenshot code above assumes that there is a CCoeEnv instance and since there is not, it leads to a crash, which is visible as that KERN-EXEC 3.

    At one point I experimented with creating a CCoeEnv instance inside the web-server, but it caused other problems, so I abandoned that approach.

    Br,
    Johan

  3. #3
    Registered User
    Join Date
    Feb 2008
    Posts
    21

    Re: screenshot not possible

    thx for your answer!
    is there any effort to fix this or to make this feature possible in MWS? Or do I have other options to provide screenshots in MWS environment?

    best regards
    Askin

  4. #4
    Nokia Developer Expert
    Join Date
    Mar 2003
    Posts
    457

    Re: screenshot not possible

    Quote Originally Posted by _Askin_ View Post
    is there any effort to fix this or to make this feature possible in MWS?
    As far as I know, nobody is looking into this at the moment.

    Byt PyS60 is fully open sourced, so just grab the code, make the fix, submit a patch, and I'm sure it will be accepted

    Or do I have other options to provide screenshots in MWS environment?
    You could make a native Apache module. In that case you have access to the complete S60 API and can do anything.

    If that's not an option, then you could make a separate Python application that takes the screenshot and with which your request handler communicates.

    Br,
    Johan

  5. #5
    Nokia Developer Expert
    Join Date
    Sep 2007
    Posts
    60

    Re: screenshot not possible

    Quote Originally Posted by _Askin_ View Post
    thx for your answer!
    is there any effort to fix this or to make this feature possible in MWS? Or do I have other options to provide screenshots in MWS environment?

    best regards
    Askin
    Seems like this is more of a feature request for Python?

Similar Threads

  1. Get a screenshot
    By er_benji in forum Symbian Media (Closed)
    Replies: 14
    Last Post: 2012-02-22, 12:39
  2. Screenshot utility for S40 phones
    By alliance205 in forum General Development Questions
    Replies: 4
    Last Post: 2011-07-15, 07:10
  3. screenshot if application is not on top
    By lkz633 in forum Symbian
    Replies: 1
    Last Post: 2007-03-16, 02:56
  4. Taking screenshot of app,which is in background?
    By mayur_24 in forum Symbian Media (Closed)
    Replies: 6
    Last Post: 2005-06-23, 10:47

Posting Permissions

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