TuesPechkin icon indicating copy to clipboard operation
TuesPechkin copied to clipboard

HtmlToImageDocument output images size problem

Open chyshu opened this issue 9 years ago • 0 comments

Hi, there

I'm tried to use the convert a HTML to jpg images in Windows 8 with VS2010 , but I got a problem is the output image have 512000*800 pixels, what parameters I should setup?

my code :

            var Doc = new HtmlToImageDocument()
            {

                In = url,
                Format = "jpg",
                ScreenWidth =800,
                ScreenHeight = 800,

            };


             byte[]  buffer =  converter.Convert(Doc);

             StreamWriter sw = new StreamWriter("d:\\test1.jpg");
             BinaryWriter bw = new BinaryWriter(sw.BaseStream);
             bw.Write(buffer);
             bw.Close(); 

chyshu avatar May 16 '15 13:05 chyshu