I'm having some troubles with the buildin antialising stuff and Bitmaps. What i am trying to do is displaying a video coming from a camera frame by frame. The cam deliveres Bitmaps in a given format (not changing), I grab those frames and convert them
to a BitmapSource that is displayed by an Image control. The control is set to the exact size of the images. The image itself is a grayscale image with some fine (1 pixel width) drawings on it (circles/lines). The image itself is a rect, but the visable
are is a circle that is surrounded by a black mask.
The first issue is that the pixel next to the mask is antialised, it appears to have a gray overlay. This can be fixed by setting the RenderingOptions.SetBitmapScalingMode(control, BitmapScaling.NearestNeighbour).
This has two effect i do not wish to have:
- The Edges of the Mask change a little bit
- The "drawings" within the Image appear to be. Circles tend to have single pixels that are placed outside the circle.
I am not bound to the Image control. So i tried this control:
http://videorendererelement.codeplex.com/ . It works not that bad, but it has a lof of bugs and initialisation issues, so i dropped it.
Any suggestions are welcome...
View Complete Post