Quantcast
Channel: HTML Renderer
Viewing all articles
Browse latest Browse all 693

New Post: HtmlRender.Render - Pixilated Images

$
0
0
This was the plan – but it won’t show through the images unless they are transparent.

I ended up doing the following:
 Image theImage = HtmlRender.RenderToImage( htmlString, (int)maxSize.Width, (int)maxSize.Height, Color.White, css );

( (Bitmap)theImage ).MakeTransparent( ( (Bitmap)theImage ).GetPixel( 1, 1 ) );
It works, but isn't the best solution because the anti-aliasing messes with the transparency. The image really needs to have a transparent background first before the text is added to it.

Viewing all articles
Browse latest Browse all 693

Trending Articles