Replies: 3 comments 2 replies
-
Hi @Flydroid, thanks for reaching out! Until now, we've always considered this to be out of scope of H5Web. It has always seemed like something that should be either done in an "HDF5 way" (RGB image, filters, etc.) or supported natively by HDF5. Adding a PNG/JPEG/... decoding library into H5Web has never seemed worth the cost (maintenance/performance). However, after some new discussions internally, we think there might be a way for H5Web to support a few basic image formats like PNG and JPEG very cheaply: by simply letting the browser decode the binary data for us! If we detect the PNG/JPEG/... magic numbers at the start of a binary blob, we can pass it straight to an HTML We could do that inside the Raw visualization, which shows up when no other visualization is supported. The problem I see is that a uint8 dataset would typically be supported by other visualizations (at least Matrix, Line and Heatmap), so the Raw visualization would not appear. I'm not very keen on changing this behaviour, as the Raw visualization is typically useless and meant as a last resort. Instead, we think a better solution would be to make use of the
Would you be open to storing your PNGs as opaque datasets? FYI, with h5py, the simplest way to create an opaque dataset is to make use of |
Beta Was this translation helpful? Give feedback.
-
Hi @axelboc, Thank you for your openness and elaborate answer! Using the I had only imagined to possibly save an array of pictures in a 2d byte array all in one dataset. |
Beta Was this translation helpful? Give feedback.
-
Closing in favour of issue #1554 |
Beta Was this translation helpful? Give feedback.
-
Hi,
I have been evaluating different options to store images in an HDF5 file.
Because build-in methods come with a large file size, we are storing png files as binary data (u8 array) in HDF5.
What would be really cool is, if h5web would support the decoding of the PNG data to then display the image.
Unfortunately i have don't have typescript experience to really contribute directly.
Beta Was this translation helpful? Give feedback.
All reactions