×

Discussion Board

Page 4 of 4 FirstFirst 1234
Results 46 to 55 of 55
  1. #46
    Registered User
    Join Date
    Mar 2006
    Posts
    4

    Re: Camera quality low with MMAPI!

    [UPDATE 2]
    just flashed a v4.04.07 22-08-05 rm-36 firmware into the 6680 and the 640 * 480 works!! However, the quality is that of an stretched 160 * 120
    [UPDATED2]
    [UPDATE]
    Bro's! Tested my codes with a n70! IT WORKS PERFECTLY!! why is the problem on with a 6680?
    [UPDATED]
    Quote Originally Posted by davidmanpearl
    By the way, when I have difficulty with "width=640&height=480" (and especially "width=1280&height=960", which I have never got to work), the system quietly terminates the thread with no exception or hint as to what happened - Arrrrgh!
    I believe that this is a bug and it is happening in:
    Image.createImage()
    I would appreciate comments from anyone with knowledge about this.

    Finally, I just ran some tests in a MIDlet. I can confirm that when there is a typo in the format string, then getSnapshot() throws a MediaException: "not supported format".

    - Regards, David <dmanpearl_at_imatte_dot_com>
    Dude, if you realized what I was asking about, you'll realise what I was asking around is the same as yours. if you'd check the "catch MediaException" it's throwing a "media format not supported error"

    anyone can give a hint?
    Last edited by JJxMan; 2006-03-13 at 13:37.

  2. #47
    Registered User
    Join Date
    Jul 2005
    Location
    Munich, Germany
    Posts
    17

    Unhappy Re: Camera quality low with MMAPI!

    Trying the nokia mmapi picture taking example http://www.forum.nokia.com/info/sw.n..._0_en.pdf.html
    it works very fine on the emulator, but on my phone 6680 i always get
    MediaException: SymbianOS error: -5
    which is meant to be "The operation requested is not supported" according to http://www.newlc.com/article.php3?id_article=117

    What's wrong with that example? Did anyone manage to run it on the 6680?

    Thanks,

    Maximilian

  3. #48
    Regular Contributor
    Join Date
    Aug 2005
    Location
    Venice, California
    Posts
    67

    Re: Camera quality low with MMAPI!

    Max,

    I use similar or same Player, VideoControl, getSnapshot code to capture images on Nokia 6620 and 6682. I can't go through the entire example in your pdf, but if you send the lines of code you are using to capture I will tell you if anything seems amiss.

    Also verify that your handset is set to allow the camera to be used:
    Tools -> Manager -> <your MIDlet> -> Options -> Suite Settings -> Multimedia -> Ask first/every time.

    In addition to the regular exceptions, be sure to check for OutOfMemoryError.

    - Regards, David Manpearl dmanpearl_at_imatte_dot_com
    Last edited by davidmanpearl; 2006-03-22 at 16:11.

  4. #49
    Registered User
    Join Date
    Jul 2005
    Location
    Munich, Germany
    Posts
    17

    Re: Camera quality low with MMAPI!

    Okay, this is the code i use for taking the picture:

    Code:
    	CameraCanvas(CameraMIDlet midlet){
    		this.midlet=midlet;
    		exitCommand=new Command("Exit",Command.EXIT,1);
    		addCommand(exitCommand);
    		setCommandListener(this);
    		try{
    			player=Manager.createPlayer("capture://video");
    			player.realize();
    			//Grab the video control and set it to the current display.
    			videoControl=(VideoControl)(player.getControl("VideoControl"));
    			if(videoControl==null){
    				discardPlayer();
    				message1="Unsupported:";
    				message2="Can't get videocontrol";
    			}
    			else{
    				videoControl.initDisplayMode(VideoControl.USE_DIRECT_VIDEO,this);
    				//centrevideo,lettingitbeclippedifit'stoobig
    				int canvasWidth=getWidth();
    				int canvasHeight=getHeight();
    				int displayWidth=videoControl.getDisplayWidth();
    				int displayHeight=videoControl.getDisplayHeight();
    				int x=(canvasWidth-displayWidth)/2;
    				int y=(canvasHeight-displayHeight)/2;
    				videoControl.setDisplayLocation(x,y);
    				captureCommand=new Command("Capture",Command.SCREEN,1);
    				addCommand(captureCommand);
    			}
    		}
    		catch(IOException ioe){
    			discardPlayer();
    			message1="IOException:";
    			message2=ioe.getMessage();
    		}
    		catch(MediaException me){
    			discardPlayer();
    			message1="MediaException1:";
    			message2=me.getMessage();
    		}
    		catch(SecurityException se){
    			discardPlayer();
    			message1="SecurityException";
    			message2=se.getMessage();
    		}
    	}
    The exception that is thrown is MediaException1. On the emulator for S60 everything works fine. Also on the phone i can successfully test for supports.video.capture.
    Could it be that the application is not allowed to access the camera? And where can i allow it in that case? There is no question about that as it is for internet connection.

    Thanks,
    Maximilian

  5. #50
    Registered User
    Join Date
    Jul 2005
    Location
    Munich, Germany
    Posts
    17

    Re: Camera quality low with MMAPI!

    It's very strange, even if "Multimedia" is set to ask, he never even opens anything like a question window...


    Quote Originally Posted by davidmanpearl
    Max,

    I use similar or same Player, VideoControl, getSnapshot code to capture images on Nokia 6620 and 6682. I can't go through the entire example in your pdf, but if you send the lines of code you are using to capture I will tell you if anything seems amiss.

    Also verify that your handset is set to allow the camera to be used:
    Tools -> Manager -> <your MIDlet> -> Options -> Suite Settings -> Multimedia -> Ask first/every time.

    In addition to the regular exceptions, be sure to check for OutOfMemoryError.

    - Regards, David Manpearl dmanpearl_at_imatte_dot_com

  6. #51
    Regular Contributor
    Join Date
    May 2008
    Location
    Copenhagen, Denmark
    Posts
    84

    Re: Camera quality low with MMAPI!

    Time to revive this old thread. Got a Nokia 3110 Classic today and I've fired off a few test snapshots.
    It says in the system property, video.snapshot.encodings, that is supports:
    encoding=image/gif
    encoding=image/jpg
    encoding=image/jpeg
    encoding=image/jpeg
    encoding=image/jpg

    Odd to mention jpg and jpeg twice AND it doesn't specify the resolutions - which it should according to the standards.
    Anyways - I've been trying to get a sharper image by using "encoding=gif" for the getSnapshot-method, but that doesn't work - what gives?

  7. #52
    Nokia Developer Champion
    Join Date
    Apr 2003
    Location
    USA, CA
    Posts
    7,192

    Re: Camera quality low with MMAPI!

    Hmm... do not have an answer yet why the jpeg and jpg are listed twice in the return. I understand that it can cause confusion and should not happen.

    However, I checked the MMAPI specification and the resolutions are not required in there. Yes, they can be part of the strings. but they are optional

    Hartti

  8. #53
    Regular Contributor
    Join Date
    May 2008
    Location
    Copenhagen, Denmark
    Posts
    84

    Re: Camera quality low with MMAPI!

    Quote Originally Posted by hartti View Post
    However, I checked the MMAPI specification and the resolutions are not required in there. Yes, they can be part of the strings. but they are optional
    Damn, I thought I had you cornered there

    Well, the "encoding=gif" for getSnapshot question still remains.

  9. #54
    Nokia Developer Champion
    Join Date
    Apr 2003
    Location
    USA, CA
    Posts
    7,192

    Re: Camera quality low with MMAPI!

    Sorry missed that "gif" one. What did you mean does not work? The images are not sharper or that the snapshot fails. WHat is the exception? Are you using any parameters in the call (like trying to set the resolution)?

    Hartti

  10. #55
    Regular Contributor
    Join Date
    May 2008
    Location
    Copenhagen, Denmark
    Posts
    84

    Re: Camera quality low with MMAPI!

    I get a MediaException: null
    Probably from the line:
    Code:
    Image.createImage(capturedImageBytes, 0, capturedImageBytes.length)
    I haven't yet set up logging (as per your article), because I left the data cable at work.

Page 4 of 4 FirstFirst 1234

Posting Permissions

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