I am generating an image using the following
generated_files = hti.screenshot(url=html_file, save_as=screenshot_filename, size=((IMG_WIDTH,IMG_HEIGHT)))
IMG_WIDTH is set to 1080
IMG_HEIGHT is set to 1920
When I open the html_file in browser, setting size to the above, all is displayed fine
But the generated image does not match this
Also the dimensions of the generated image are double of what I defined, they are 2160x3840.
The visble green bar at the bottom is the body's background color from css in the html file
body {
background-color: green;
width: 100vw;
min-height: 100vh;
}
So something is truncating the actual content of the div containing the background.
I also tried setting the image as background for the body
body {
/*background-color: green;*/
background-image: url("../template/wallpaper_ausblick_1080x1920.jpg");
background-repeat: no-repeat;
background-attachment: fixed;
background-size: cover;
width: 100vw;
min-height: 100vh;
}
But even then the green bar remains. It appears something is "reserving" some space at the bottom and prevents the background image being displayed in there.
I am generating an image using the following
IMG_WIDTHis set to 1080IMG_HEIGHTis set to 1920When I open the
html_filein browser, setting size to the above, all is displayed fineBut the generated image does not match this
Also the dimensions of the generated image are double of what I defined, they are 2160x3840.
The visble green bar at the bottom is the body's background color from css in the html file
So something is truncating the actual content of the div containing the background.
I also tried setting the image as background for the body
But even then the green bar remains. It appears something is "reserving" some space at the bottom and prevents the background image being displayed in there.