×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Apr 2009
    Posts
    4

    Camera view rotated 90 Degrees on C7

    Hello out there,

    I am developing a camera handling in JavaME. Now a got a 'funny' effect I do nevertheless do not want. On the device C7-00 the camera view is rotated 90 Degrees. On N97 Mini the camera view is shown correctly. In both cases the snapshot taken is in the correct orientation. I use the same Jar for both devices.

    I am using portraitmodus only (Flag Nokia-MIDlet-App-Orientation is set to portrait). Removing this Flag solves the problem with the camera orientation, but I want to keep it, as the camera is only part of a bigger application which runs into graphical problems on rotations without it. So I could remove it and fix the graphical problems in the rest of the application wihch will cost quiet a lot of time. Any better solutions?

    Here the code to initialize the VideoControl.

    Code:
    private void initMyPlayer() throws IOException, MediaException, SecurityException, Exception
        {
            mPlayer = null;
            mPlayer = Manager.createPlayer("capture://video");
            mPlayer.realize();
    
            // Grab the videocontrol and set it to the current display
            mVideoControl = null;
            mVideoControl = (VideoControl) (mPlayer.getControl("VideoControl"));
            if (mVideoControl == null)
            {
                throw new Exception("Couldn't create VideoControl");
            }
    
            mVideoControl.initDisplayMode(VideoControl.USE_DIRECT_VIDEO , MyMIDlet.mCanvas);
    
            mVideoHeight = mVideoControl.getSourceHeight();
            mVideoWidth = mVideoControl.getSourceWidth();
            
            mVideoControl.setDisplayLocation(0, 0);
            mVideoControl.setDisplaySize(mVideoWidth,mVideoHeight);
            mVideoControl.setVisible(true);
    
            mPlayer.start();
        }

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

    Re: Camera view rotated 90 Degrees on C7

    Quote Originally Posted by stefanz View Post
    Hello out there,

    I am developing a camera handling in JavaME. Now a got a 'funny' effect I do nevertheless do not want. On the device C7-00 the camera view is rotated 90 Degrees. On N97 Mini the camera view is shown correctly. In both cases the snapshot taken is in the correct orientation. I use the same Jar for both devices.

    I am using portraitmodus only (Flag Nokia-MIDlet-App-Orientation is set to portrait). Removing this Flag solves the problem with the camera orientation, but I want to keep it, as the camera is only part of a bigger application which runs into graphical problems on rotations without it. So I could remove it and fix the graphical problems in the rest of the application wihch will cost quiet a lot of time. Any better solutions?

    Here the code to initialize the VideoControl.

    Code:
    private void initMyPlayer() throws IOException, MediaException, SecurityException, Exception
        {
            mPlayer = null;
            mPlayer = Manager.createPlayer("capture://video");
            mPlayer.realize();
    
            // Grab the videocontrol and set it to the current display
            mVideoControl = null;
            mVideoControl = (VideoControl) (mPlayer.getControl("VideoControl"));
            if (mVideoControl == null)
            {
                throw new Exception("Couldn't create VideoControl");
            }
    
            mVideoControl.initDisplayMode(VideoControl.USE_DIRECT_VIDEO , MyMIDlet.mCanvas);
    
            mVideoHeight = mVideoControl.getSourceHeight();
            mVideoWidth = mVideoControl.getSourceWidth();
            
            mVideoControl.setDisplayLocation(0, 0);
            mVideoControl.setDisplaySize(mVideoWidth,mVideoHeight);
            mVideoControl.setVisible(true);
    
            mPlayer.start();
        }
    try with - USE_GUI_PRIMITIVE instead of USE_DIRECT_VIDEO in mVideoControl.initDisplayMode();
    thanks,
    ~Amitabh
    (Champion of the Month -Aug'13)
    Follow me on my blog for Innovative Mobile Apps

  3. #3
    Registered User
    Join Date
    Apr 2009
    Posts
    4

    Re: Camera view rotated 90 Degrees on C7

    Hy im2amit,

    thank you for your reply. I changed everything to USE_GUI_PRIMITIVE instead of USE_DIRECT_VIDEO. I can see the the camera view again - but still rotated (.

    If I remove the flag, the camera view is not rotated as I sayed. I now found, that the snapshot itself is rotated then. (

    I already tried out a free app I downloaded (FaceWarp). There the camera view is shown correctly, after taking the photo it is shown 90 Degrees rotated for a moment and then in the correct orientation again. Seems to me they had the same problem there, got a 90 Degrees rotated picture and calculated the backrotated image, showing the not rotated image on mistake. As this download is only ment for C7, this was a workaround made exspecially for this mobile. So it seems to me, this a C7 bug (while the normal mobile camera is working correctly).

    Do you agree this is a C7 bug or do you have another idea?

Similar Threads

  1. Ask about camera view finder in NOKIA C7 phone
    By ob20645 in forum [Archived] Qt Mobility Project
    Replies: 1
    Last Post: 2011-02-21, 18:58
  2. rotate a picture less than 90 degrees
    By CmoaToto in forum Symbian
    Replies: 1
    Last Post: 2008-10-23, 11:42
  3. Camera rotated 90 degrees
    By nuker85 in forum Symbian
    Replies: 0
    Last Post: 2008-02-17, 13:13
  4. captured video is rotated by 90 degrees
    By rosenholzer in forum Mobile Java Media (Graphics & Sounds)
    Replies: 3
    Last Post: 2007-10-25, 09:00
  5. Replies: 6
    Last Post: 2007-01-09, 16:14

Posting Permissions

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