linnarsson-lab / loom-viewer

Tool for sharing, browsing and visualizing single-cell data stored in the Loom file format
BSD 2-Clause "Simplified" License
35 stars 6 forks source link

Remove reliance on getImageData in scatterplot #145

Open JobLeonard opened 6 years ago

JobLeonard commented 6 years ago

Due to the practice of canvas fingerprinting, getImageData is considered a security risk these days.

Currently, we use getImageData to extract raw image data from generated sprites, for fast plotting in the scatterplot code. This is going to be problematic in the future, as some browsers have decided to blacklist this function due to Canvas Fingerprinting abuse, and there are already extensions used by privacy-minded people that do the same.

Of course, this would require coding up a full software sprite generator. I actually have the know-how required to do that (luckily our shapes are very simple; I basically just need to support Bresenham Lines, Bresenham Circles and flood fill), but it's a pain and might take quite some time to implement, so this is low-priority for know