Glodenox / wme-image-overlays

A userscript that allows Waze editors to overlay a local image onto the map in the background
GNU General Public License v3.0
4 stars 1 forks source link

Allow turning certain colours transparent when inserting image #15

Open Glodenox opened 4 years ago

Glodenox commented 4 years ago

It should be possible to allow users to remove certain colours so those areas become transparent. By using a canvas element instead of a regular img tag, this might indeed be possible. See https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API/Tutorial/Pixel_manipulation_with_canvas

Things to consider: this can currently already be done with external image editing software. Implementing this is not trivial, especially from a UX standpoint. This would also certainly require a way to undo changes while editing and the odds are high that once this gets added, other features will be requested that are already available within image editing software.

Glodenox commented 4 years ago

Ideas for reasonable filters that could be toggled for the images individually: