silx-kit / h5web

React components for data visualization and exploration
https://h5web.panosc.eu/
MIT License
161 stars 17 forks source link

Add toggle to fit raw image (on by default) #1633

Closed axelboc closed 2 months ago

axelboc commented 2 months ago

Fix #1630

I add a toggle button to the Raw visualization toolbar and a (persisted) config store to hold the state. The button is toggled on by default. When the dataset isn't a binary image, the button is disabled.

I chose to create a separate visualization component called RawImageVis to deal specifically with JPEG/PNG images; it's the RawVisContainer that now decides which visualization component to use.

fit-raw-image