Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > Avalon

Vista Tutorial - Rendering bitmap is Blurry in WPF

 
 
Old 12-14-2008   #1 (permalink)
pym
Newbie


Join Date: Dec 2008
Vista Home Premium 32bit.
 
 

Rendering bitmap is Blurry in WPF

Hello,

I am trying to convert some vector based objects into a raster bitmap.
I manage to do that, but the result is blurry, meaning, edges are blurry instead of jagged.
I assume an anti-aliasing algorithm is applied, but I do not want to be applied...

here is my simplified code in which I draw a circle and make a raster out of it to an Image Control:

Code:
DrawingVisual drawingVisual = new DrawingVisual();
DrawingContext drawingContext = drawingVisual.RenderOpen();
drawingContext.DrawEllipse(Brushes.Red, new Pen(Brushes.Red, 1), new Point(50, 50), 50, 50);
drawingContext.Close();

RenderTargetBitmap bmp = new RenderTargetBitmap(180, 180, 96, 96, PixelFormats.Pbgra32);
bmp.Render(drawingVisual);

RenderOptions.SetEdgeMode(_image, EdgeMode.Aliased);
_image.Source = bmp;
Here is an image to make it clearer.
What I want is the jagged edged circle...
ImageShack - Image Hosting :: 98299814ew8.png

Does anyone have any idea why this happens???
Thanks!

My System SpecsSystem Spec
 

Thread Tools


Similar Threads
Thread Forum
Merge one bitmap onto another in vb .NET General
Corrupted block bitmap? Vista General
bitmap Vista file management
bitmap compression Vista music pictures video
I want to be able to create a new bitmap... Vista General


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46