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

New Post: A generic error occurred in GDI+.

$
0
0
sorry for the late reply, didn't have time to check it.
found the issue, the html snipped you are using has relative width of 75%, in this case the html layout tries to take as much space as possible and because image rendering, unlike control, has no width limit it tries to create image that is too large, resulting in GDI+ error.
the simplest solution is to specify maxWidth as the second parameter to RenderToImage.
I will also add a safeguard in code so the final image will be limited to 4096, unless specific max width limit is provided.

Viewing all articles
Browse latest Browse all 693

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>