×

Discussion Board

Page 1 of 2 12 LastLast
Results 1 to 15 of 16
  1. #1
    Registered User
    Join Date
    Jun 2008
    Posts
    6

    getSnapshot on S40

    Hi,

    I'm trying to capture an image on a S40 device. The problem is that even if i create the Player using:

    player = Manager.createPlayer("capture://image");
    videocontrol = (VideoControl) player.getControl("VideoControl");

    when i call :

    imagebyte = videocontrol.getSnapshot("encoding=jpeg");

    i get the following error:

    javax.microedition.media.MediaException: Invalid locator: capture://video?encoding=jpeg

    Why is the locator set to capture://video when trying to get the Snapshot if the Player is created using capture://image?

  2. #2
    Regular Contributor
    Join Date
    Apr 2007
    Posts
    220

    Re: getSnapshot on S40

    Hi,
    One clarification i would like to have is that whether the handset you are using supports the jpeg formata or not?

    Does

    byte[]imageData=videoControl.getSnapshot(null); works fine and saves the image in PNG(the default)format.

    Regards
    Amit

  3. #3
    Registered User
    Join Date
    Jun 2008
    Posts
    6

    Re: getSnapshot on S40

    Thx Amit,

    Yes, the devices suppots the jpeg format.

    The problem was that only getSnapshot(null) only seems to work while getSnapshot("encoding=jpeg") throws a MediaException.

    Regards,
    Radu

  4. #4
    Registered User
    Join Date
    Sep 2008
    Posts
    1

    Re: getSnapshot on S40

    Is there a fix for this?
    I get the same on the S40 emulator, i.e. create the control on capture://image but regardless of what parameters I put in I get "Invalid Locator "capture:/video?"etc. I've tried
    * getSnapshot("width=1200&height="1600")
    * getSnapshot("encoding=image/png") (as returned from getSystem("video.snapshot.encodings")).

    As well as a variety of others all with no luck. The only getSnapshot method that seems to work is getSnapshot(null) which is useless because I need the higher resolution.

  5. #5
    Registered User
    Join Date
    Jan 2009
    Posts
    40

    Re: getSnapshot on S40

    I want to getsnapshot and save picture to phone but at least 640x480 resulotion but i cannot?
    I searched at forums and google but i couldnt find anything?
    Is there anybody who knows?

    Best Regards
    Thanks

    Quote Originally Posted by will.bath View Post
    Is there a fix for this?
    I get the same on the S40 emulator, i.e. create the control on capture://image but regardless of what parameters I put in I get "Invalid Locator "capture:/video?"etc. I've tried
    * getSnapshot("width=1200&height="1600")
    * getSnapshot("encoding=image/png") (as returned from getSystem("video.snapshot.encodings")).

    As well as a variety of others all with no luck. The only getSnapshot method that seems to work is getSnapshot(null) which is useless because I need the higher resolution.

  6. #6
    Registered User
    Join Date
    Feb 2009
    Posts
    19

    Re: getSnapshot on S40

    Hi,
    Anybody succeeded in capturing heigher resolution images ?

    Thanks,
    sreelakshmi

  7. #7
    Nokia Developer Champion
    Join Date
    Sep 2008
    Location
    Noida, U.P.
    Posts
    1,330

    Thumbs up Re: getSnapshot on S40

    Hi,
    pls check out the following link may contain solution of ur problem..

    http://stackoverflow.com/questions/2...access-in-j2me
    http://www.hcilab.org/documents/tuto...nceEvaluation/

    sorry to say this but me also not found any such important information regarding resolution for series 40 devices. May the links mention above helps u somewhile.

    try them and reply..

    thanks,
    jitu_goldie..
    thanks,
    jitu_goldie..

    KEEP TRYING..

  8. #8
    Registered User
    Join Date
    Feb 2009
    Posts
    19

    Re: getSnapshot on S40

    Hi,
    Thanks for your reply . Actually I've gone through the links given by you already. But couldn't succeed . getSnapshot() works, only if I am passing "null". If I pass any parameter, then I get MediaException as explained by Radu in his previous post.

  9. #9
    Nokia Developer Champion
    Join Date
    Sep 2008
    Location
    Noida, U.P.
    Posts
    1,330

    Thumbs up Re: getSnapshot on S40

    Hi,
    Please check the image formats supported by ur device first.

    use :>>>> System.getProperty("video.snapshot.encodings");

    this will returns u a string contains formats supported by ur device.
    Please check and reply.

    thanks,
    jitu_goldie..
    thanks,
    jitu_goldie..

    KEEP TRYING..

  10. #10
    Registered User
    Join Date
    Feb 2009
    Posts
    19

    Re: getSnapshot on S40

    Hi jitu_goldie,

    System.getProperty("video.snapshot.encodings"); returns "encoding=image/gif encoding=image/jpg encoding=image/jpeg encoding=image/jpeg encoding=image/png encoding=image/jpg" .

    When I pass null to getSnapshot(), by default it is giving jpeg image.But as of now I am not bothered about the image encoding. I am trying to get higher resolution images.

    Thanks,
    Sreelakshmi.

  11. #11
    Registered User
    Join Date
    Oct 2005
    Posts
    23

    Angry Re: getSnapshot on S40

    Quote Originally Posted by sreelakshmir View Post
    Hi jitu_goldie,

    System.getProperty("video.snapshot.encodings"); returns "encoding=image/gif encoding=image/jpg encoding=image/jpeg encoding=image/jpeg encoding=image/png encoding=image/jpg" .

    When I pass null to getSnapshot(), by default it is giving jpeg image.But as of now I am not bothered about the image encoding. I am trying to get higher resolution images.

    Thanks,
    Sreelakshmi.
    Hi all,

    I'm also facing the same problem in s40 5th edition phones. No arguments are accepted by getSnapshot (no encoding, no resolution...). I do need bigger images. Is there any oficial response from Nokia?


    I also have another problem with MMAPI implementation in s40 phones. Videocontrol returns 128x96 as source width and height but the captured image is 120x160. When I display the camera in a canvas or a form the video area is 128x96, but the video is centered and left black margins at the sides (like films black stripes, but vertical ones). Anyone has experienced this? Any way to workaround it?

    Thanks

  12. #12
    Nokia Developer Champion
    Join Date
    Sep 2008
    Location
    Noida, U.P.
    Posts
    1,330

    Thumbs up Re: getSnapshot on S40

    try this :
    byte[] capturedImageBytes = videoControl.getSnapshot("encoding=png&width=480&height=640");
    thanks,
    jitu_goldie..

    KEEP TRYING..

  13. #13
    Registered User
    Join Date
    Jun 2010
    Posts
    5

    Re: getSnapshot on S40

    Quote Originally Posted by sreelakshmir View Post
    Hi jitu_goldie,

    System.getProperty("video.snapshot.encodings"); returns "encoding=image/gif encoding=image/jpg encoding=image/jpeg encoding=image/jpeg encoding=image/png encoding=image/jpg" .

    When I pass null to getSnapshot(), by default it is giving jpeg image.But as of now I am not bothered about the image encoding. I am trying to get higher resolution images.

    Thanks,
    Sreelakshmi.
    hi,

    I too have same problem. r u got the solution to get high resolution.if u got pls help me.

    regards
    Gowri

  14. #14
    Registered User
    Join Date
    Oct 2009
    Location
    Noida
    Posts
    941

    Re: getSnapshot on S40

    Quote Originally Posted by gowribalaguru View Post
    hi,

    I too have same problem. r u got the solution to get high resolution.if u got pls help me.

    regards
    Gowri
    See this link, It might help you -- http://stackoverflow.com/questions/2...access-in-j2me

    Please don't expect that you can capture high resolution images using getSnapshot() in j2me on S40 because most S40 devices have a max heap size of around 2MB , which does not allow us to capture and render big high resolution images.
    Last edited by ektasrv; 2010-06-24 at 10:28.
    Thanks,
    Ekta

  15. #15
    Registered User
    Join Date
    Jun 2010
    Posts
    5

    Re: getSnapshot on S40

    Quote Originally Posted by ektasrv View Post
    See this link, It might help you -- http://stackoverflow.com/questions/2...access-in-j2me

    Please don't expect that you can capture high resolution images using getSnapshot() in j2me on S40 because most S40 devices have a max heap size of around 2MB , which does not allow us to capture and render big high resolution images.
    Thanks for reply
    i want to set default 240*320 resolution to image.but i cannot set the resolution on getsnapshot().if i set ,it returns null.wht to do pls help me

    Regards
    Gowri

Similar Threads

  1. S40 - S60 Calling sequence diff
    By prakash.raman in forum Mobile Java General
    Replies: 1
    Last Post: 2008-07-23, 11:07
  2. Problem with S40 5th Edition emulation, NCF 1.2 and BT dongle
    By nevillesatz in forum Bluetooth Technology
    Replies: 1
    Last Post: 2007-07-05, 10:52
  3. S40 MIDI HELP!
    By 21n9 in forum Symbian Media (Closed)
    Replies: 2
    Last Post: 2006-10-15, 21:53
  4. Bluetooth Connectivity with S40 DP 2.0 SDK 1.1
    By carlostoro in forum Mobile Java Networking & Messaging & Security
    Replies: 1
    Last Post: 2005-10-07, 23:01
  5. Nokia手机主要参数列表
    By cqucyf in forum [Archived] Other Programming Discussion 关于其他编程技术的讨论
    Replies: 0
    Last Post: 2005-05-04, 16:34

Posting Permissions

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