|
|
|
date: Thu, 21 Feb 2008 14:30:22 -0000,
group: microsoft.public.platformsdk.gdi
back
Re: reasterization of wmf/emf data looks terrible on vista
just as a follow-up on this one
I discover that the problem is not OS dependent - it's to do with with
antialiasing of screen fonts (i.e. "smooth edges of screen fonts" in the
display control panel). if this setting is off, the results are reasonable,
but with this setting on the text is all blocky.
i would guess it's trying to antialias but for some reason all the extra
pixels it inserts are coming out black
FWIW here's my code. any reason this would not antialias text properly?
Image inputMetafile = new Metafile(inputStream);
Image outputBitmap = new Bitmap(width, height),
PixelFormat.Format24bppRgb);
Graphics graphics = Graphics.FromImage(outputBitmap);
graphics.Clear(Color.White);
graphics.DrawImage(inputMetafile, new Rectangle(new Point(0, 0), new
Size(width, height)));
outputBitmap.Save(outputStream, ImageFormat.Jpeg);
Andy
"Andy Fish" wrote in message
news:OvlYNZJdIHA.5668@TK2MSFTNGP05.phx.gbl...
> Hello,
>
> I am using graphics.DrawImage() in the .Net 2.0 CLR to convert a wmf/emf
> vector image to png. the data is actually a preview of a spreadsheet
> embedded in a word document.
>
> If I do this on vista, text output looks really blocky (as if it were
> triple-bold or something) compared to how it looks on XP or 2003 server
> (which is pretty much the same as it looks on the screen in word)
>
> anyone got any ideas what could be affecting this or is it just (shock,
> horror) a bug in vista ?
>
> Andy
>
date: Fri, 22 Feb 2008 16:14:02 -0000
author: Andy Fish
|
|