[EMAIL PROTECTED] wrote: > Hey, > > This may be a little bit naive - I've only just started looking at > Gecko today - but I cannot see an obvious way to retrieve a page > rendered in Gecko into a device-independent memory buffer, e.g. as a > bitmap. To cut a long story short, I'm interested in using Gecko to > render some HTML, without actually displaying the HTML in a browser > window (or any window for that matter!) but instead saving the > rendered information away to some sort of image. > > Assuming this is possible (lets be honest, it's probably not exactly > what Gecko was designed for), is this something that is likely to be > do-able in a reasonably cross-platform sense? Or am I likely to be > dealing with HDCs on Windows and some form of GTK object, or lower > level primitive under Linux?
Have you tried using canvas? drawWindow will let you could use to draw the page to the canvas (this window does not have to be visible, it could be the contentWindow from an invisible iframe for example) getImageData could then be used to retrieve the image data off the canvas (note: this might be harder to do if you aren't planning on doing it from Javascript because canvas gets the arguments from XPConnect). Best regards, Andrew > > Thanks for any help in advance, > > James _______________________________________________ dev-tech-layout mailing list [email protected] https://lists.mozilla.org/listinfo/dev-tech-layout

