legacysurvey / imagine

The code that runs http://legacysurvey.org/viewer -- map-like viewer for astronomical images, especially the Dark Energy Camera Legacy Survey
BSD 3-Clause "New" or "Revised" License
27 stars 11 forks source link

Investigate more options for client-side image controls #79

Open dstndstn opened 2 years ago

dstndstn commented 2 years ago

Beyond brightness/contrast sliders.

The SVG standard has a rich set of color transformation functions, the most general being component-wise functions including gamma and piecewise linear: https://drafts.fxtf.org/filter-effects/#feFuncRElement There is also a matrix combiner for RGBA, https://drafts.fxtf.org/filter-effects/#feColorMatrixElement

Not sure whether this can wrap our whole Leaflet map object. Looks like maybe you can, using the 'url' function in CSS: https://developer.mozilla.org/en-US/docs/Web/CSS/filter#applying_svg_filters

This page gives a good summary of the CSS filters available and their SVG equivalents. https://developer.mozilla.org/en-US/docs/Web/CSS/filter