
IMGKit: Python library of HTML to IMG wrapper - Jack0614
https://github.com/jekal/imgkit
======
NKCSS
What would be a good reason to use this over PhantomJS?

~~~
pmlnr
As much as I despise the nodejs dependency hell, PhantomJS is a better
solution when compared to wkhtml, so a Python-PhantomJS wrapper would be a
significantly better product imho.

~~~
NKCSS
PhantomJS has stand-alone binaries that you can just call from Python if you
wanted.

~~~
hackerboos
That's all this project does.

------
llccbb
Can this create/upsample an image to a specified resolution/zoom level? Say I
want a 2000x5000 pixel image of the way a website looks when the window size
is 400x1000.

I looked through the manual but didn't see explicit examples.

~~~
dr_zoidberg
If it's jsut upsampling you could do that with PIL/Pillow, after saving the
output image.

~~~
minimaxir
Not if you want photos of how responsive layouts behave at higher resolutions.

~~~
kevinwang
Which is why the parents specifically are just talking about upsampling the
image, though

~~~
llccbb
I want it rendered at the higher resolution, not upsampled from a lower-
resolution image. Should have made that more clear.

------
lyschoening
How well does this handle SVGs? I used PhantomJS for headless rendering
before, but it didn't properly render SVG linear gradients.

------
mertd
Does the text remain text or does it become an image?

~~~
ziikutv
It creates an image. Think of it like taking a screenshot of the website.

~~~
mertd
For the sake of preserving the structure, I'd prefer WeasyPrint.

------
parceltape
I think the title of this is a bit misleading. It is a wrapper lib around the
cli of wkhtmltopdf (which the GitHub repo states).

~~~
mschuster91
Oh god. wkhtmltopdf sucks on so many levels, Webkit itself being one of them
as their fork is totally outdated... sometimes I really think about rewriting
it using Chromium Embedded Framework.

~~~
hackerboos
You're better off using PhantomJS to take screenshots.

There's still no great solution for Flash if you have to support that. I did a
lot of research on this previously.

