Posted by Toby A Inkster on 04/16/07 11:17
Krustov wrote:
> Look at it as a logical step by step process .
>
> (1) create a 800x600 blank image using gd or im
> (2) grab the html code from the website
> (3) write script to scan html code for stuff like background colour
> (4) fill 800x600 with found background colour (or white if none found)
> (5) write script to check for <img> etc in the html code
> (6) paste images onto 800x600 image
> (7) write text onto 800x600 image
The mind boggles! Do you really think you can write a full-blown
standards-compliant HTML+CSS renderer in 2 hours?! If so, a well-paid
job at the Mozilla Foundation is calling for you!
The only practical method is to spawn an instance of an existing HTML
rendering system (in most cases, this is a full browser -- e.g. Mozilla,
Opera) and take a screenshot (using ImageMagick if you wish).
--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact
Geek of ~ HTML/SQL/Perl/PHP/Python*/Apache/Linux
* = I'm getting there!
Navigation:
[Reply to this message]
|