Re: Camera preview orientation on HTC-Universal
- From: "Gary Daniels [MS]" <garydan@xxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 12 Dec 2005 18:52:41 -0800
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
.
- Follow-Ups:
- Re: Camera preview orientation on HTC-Universal
- From: cputoaster
- Re: Camera preview orientation on HTC-Universal
- References:
- Camera preview orientation on HTC-Universal
- From: cputoaster
- Camera preview orientation on HTC-Universal
- Prev by Date: Closing Word Mobile in WM5
- Next by Date: Re: Camera or not?
- Previous by thread: Camera preview orientation on HTC-Universal
- Next by thread: Re: Camera preview orientation on HTC-Universal
- Index(es):
Relevant Pages
|