12 ms·
If I wanted a non-downloadable image I would make it from 1px wide/tall colored divs.
by dvh 5y ago
If I wanted a non-downloadable image I would make it from 1px wide/tall colored divs.
- MildlySerious 5y agoPretty sure that was actually used in emails at some point, just with tables, to get around email clients not loading images.
- Karellen 5y agoEmail clients generally don't load external images. The majority should still display images that are sent as part of a multipart/mixed message though, and those should take up significantly less space than thousands of divs/tds and color attributes.
- masswerk 5y agoI actually used this to generate graphs in JS/HTML in the 1990s. :-)
- can16358p 5y agoOut of curiosity, how was the performance (of course normalized to performance of that era)?
- masswerk 5y agoHere's a somewhat older approach splitting charts into linear runs of 1x1 images, which has some statistics at the bottom of each chart: https://www.masswerk.at/demospace/relayWeb_en/chartset.htm https://www.masswerk.at/demospace/relayWeb_en/chartset.htm (Or see https://www.masswerk.at/demospace/relayWeb_en/welcome.htm https://www.masswerk.at/demospace/relayWeb_en/welcome.htm and select "charts". Total time for calculations and rendering was then in the about 1 sec range. The real problem for using this in production was that these charts could be printed on Windows with Postscript printers only. I think, this was eventually fixed in Windows 98 SE.)
- dorkwood 5y agoI thought this is what it was going to be! Another method would be to generate a plane with the same number of vertices as pixels, store the pixel color values as an attribute, and then render the mesh to a canvas.
- dvh 5y agoYou can right-click canvas and save it as image.