Re: Camera preview orientation on HTC-Universal



When you set the format on the preview pin, are you creating your own media
type to set or retrieving one from the driver and just tweaking it to what
you want?

A special flag was developed (BI_SRCPREROTATE) which tells GDI and the video
renderer that the orientation of the image from the camera is in the correct
orientation (don't rotate when rendering it). This is necessary because as
you rotate the shell on the device you also physically rotate the device.
When the display driver rotates bitmaps to render the shell and UI it needs
to know that this particular bitmap shouldn't be rotated. The flag is or'd
into the biCompression field in the BITMAPINFO structure.

I suspect you created your own format structure from scratch and did not set
this flag, resulting in GDI rotating your preview along with the physical
rotation of the device.

Gary Daniels
Windows CE Multimedia and Graphics

This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use.

"cputoaster" <cputoaster@xxxxxxxxxxxxx> wrote in message
news:%23%23ykxPz$FHA.1600@xxxxxxxxxxxxxxxxxxxxxxx
> Hi,
>
> after I actually got the capture and filter to work, I am having a strange
> problem. The input from the camera gets displayed "flipped over the
> diagonal", meaning it is rotated by 90 degrees and then flipped
> horizontally. And this changes depending on screen rotation. While I can
> rotate the image manually by writing a filter (I already did), it is
> certainly the wrong way and will cut off 1/4 of the image (if I do it per
> in-place-filter).
>
> How can I tell the output renderer to NOT rotate / flip the content? The
> original video recording app can do it correctly, so there must be some
> flags on that camera or output renderer to set. I did already try the
> documented flip and roll attributes, without luck.
>
> Andres


.



Relevant Pages

  • Re: Camera preview orientation on HTC-Universal
    ... It sounds to me like you're seeing a camera ... does not use DirectShow or the DirectShow camera driver. ... This is necessary because as you rotate the shell on the device you also physically rotate the device. ... How can I tell the output renderer to NOT rotate / flip the content? ...
    (microsoft.public.pocketpc.developer)
  • Re: Camera preview orientation on HTC-Universal
    ... Camera roll is supposedly supported ) but does not have any effect. ... This is necessary because as you rotate the shell on the device you also physically rotate the device. ... to use the same transform for both screen rotations. ... How can I tell the output renderer to NOT rotate / flip the content? ...
    (microsoft.public.pocketpc.developer)
  • Re: Rotate display questions.
    ... maybe you should better include rotate support in your specific driver (just ... > our device will actually be a kiosk-type device, so my app will always be in> landscape mode. ...
    (microsoft.public.windowsce.platbuilder)
  • Re: Recovery by Charge Coupled Device
    ... some flag in the JPEG to say "rotate this image upon display". ... has a sensor to set the orientation in the EXIF data. ... Canon even have a menu option in the device to "rotate the image" ... (I must admit that although the camera has other limitations, ...
    (alt.sysadmin.recovery)
  • Re: newsyslog(8) patch for both size and time checks
    ... Any objection to commit this? ... log file will only be rotated if both conditions are true. ... With the documented behavior, the effect is "rotate ... add a new flag to control this behavior. ...
    (freebsd-current)