×

Discussion Board

Results 1 to 8 of 8
  1. #1
    Registered User
    Join Date
    Mar 2010
    Posts
    9

    How do I find the camera's supported resolutions?

    Hi, this is my first post here so, sorry if I'm doing anything wrong!
    (it's been a while since the last time I wrote something in english, so if it's hard to understand something, please let me know.)

    I'm developing an application that access the device's camera and takes pictures to send them by HTTP.

    It's already working but the default resolution is really low (I think it's 160x140).

    I've been searching for a way to get a better resolution and found out that I can do something like:

    Code:
    videoControl.getSnapshot("encoding=jpeg&width=640&height=480");
    My problem is that this resolution(or a better one) might not be supported by some device.

    To solve it I've considered two options:

    1 - Discover the device's camera supported resolutions and have the user to choose the one he wants to take the snapshot; (I couldn't find a way to discover the device's camera supported resolutions)

    2 - Discover the camera's currently set resolution and take the picture with this resolution. (Don't know how to find the camera's currently set resolution).

    By the way, I'm using MIDP 2.0 with CLDC 1.0 (can't use CLDC 1.1)

    Looking forward for any ideas!! Thank you.

  2. #2
    Nokia Developer Champion
    Join Date
    Feb 2009
    Location
    Noida, India
    Posts
    3,085

    Re: How do I find the camera's supported resolutions?

    Welcome to Forum Nokia Java Developer Discussion board!

    try System.getProperty("camera.resolutions");

    camera.resolutions The String returned specifies the sensor sizes of the cameras of the device. The String consists of sensor sizes per device, delimited by one whitespace (Unicode U+0020). The String for a sensor size has the format device_name : width x height without whitespace characters.
    An example of a returned String: "devcam0:1024x768 devcam1:640x480".
    If no cameras are supported, the camera.resolutions returns "null". Default camera (capture://video) is listed first in the String.

    thanks,
    ~Amitabh

  3. #3
    Registered User
    Join Date
    Mar 2010
    Posts
    9

    Re: How do I find the camera's supported resolutions?

    Hi, thanks for your answer but I'm still having problems to get the camera's resolutions.
    I tried it on the device I have here for testing, but it returned null.
    I've looked for it and found out that "camera.resolutions" is part of the JSR-234 API.
    But even if the device implements this API, it doesn't have to implement the camera's properties.
    I've tryed System.getProperty("supports.mediacapabilities") and got "music audio3d" as response.

    Is there any other way to get the camera's resolution(if possible not depending on JSR-234) ?

  4. #4
    Nokia Developer Champion
    Join Date
    Feb 2009
    Location
    Noida, India
    Posts
    3,085

    Re: How do I find the camera's supported resolutions?

    Try taking a snapshot and then find the size of the image captured and you will the resolution of the image it can capture.\

    using - http://wiki.forum.nokia.com/index.ph...ots_in_Java_ME


    thanks,
    ~Amitabh

  5. #5
    Registered User
    Join Date
    Mar 2010
    Posts
    9

    Re: How do I find the camera's supported resolutions?

    Quote Originally Posted by im2amit View Post
    Try taking a snapshot and then find the size of the image captured and you will the resolution of the image it can capture.\
    Hi im2amit, thanks for your answer and sorry for the late reply.
    What I wanted was to list the possible resolutions so that the user could decide which one he wanted, but this way I would only get the default resolution.

    Haven´t solved it yet but this is no longer needed in my application. All I do now is trying to take the snapshot with width=640 and height = 480.

    Also, it seems to me that the parameters which set the snapshot's width and height don't change the snapshot's resolution, only it's size. But the picture's quality is better this way than if I take a smaller picture and resize it later. Is there a way to actually change the snapshot's resolution?

    thanks again for your answer

  6. #6
    Nokia Developer Champion
    Join Date
    Feb 2009
    Location
    Noida, India
    Posts
    3,085

    Re: How do I find the camera's supported resolutions?

    YOu can educate the user to set the device camera for max resolution. or serach the MMAPI-Camera API's

    thanks,
    ~Amitabh

  7. #7
    Registered User
    Join Date
    Mar 2010
    Posts
    9

    Re: How do I find the camera's supported resolutions?

    Correct me if I'm wrong, but I've tested it and the device's camera resolution doesn't apply to the snapshot taken when the camera is accessed by the application.

  8. #8
    Registered User
    Join Date
    Jan 2007
    Posts
    49

    Re: How do I find the camera's supported resolutions?

    http://wiki.forum.nokia.com/index.ph...ots_in_Java_ME

    the example does not work 100% on Nokia X3. Only works after starting the app the second time around.

Similar Threads

  1. Cannot Play AMR File
    By khalandar in forum Mobile Java Media (Graphics & Sounds)
    Replies: 3
    Last Post: 2007-06-13, 11:00
  2. jsr135 highest supported camera resolutions for getSnapShot() on N95
    By garyjamessilva in forum Mobile Java Media (Graphics & Sounds)
    Replies: 3
    Last Post: 2007-05-30, 21:14
  3. Replies: 2
    Last Post: 2007-02-09, 23:57
  4. Can not enter letter in find box! (Help me please!)
    By ctpthanh in forum Symbian User Interface
    Replies: 0
    Last Post: 2005-03-13, 08:41
  5. list box example
    By murmur20 in forum Symbian User Interface
    Replies: 1
    Last Post: 2004-11-09, 04:42

Posting Permissions

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