google / neuroglancer

WebGL-based viewer for volumetric data
Apache License 2.0
1.09k stars 299 forks source link

fix(datasource/precomputed): check PNG image dimensions less strictly #654

Closed jbms closed 4 weeks ago

jbms commented 4 weeks ago

TensorStore encodes chunks of shape (x_size, y_size, z_size, c_size) with width=x_sizey_size, height=z_size, while cloud-volume uses width=x_size, height=y_sizez_size.

With this change, Neuroglancer will accept any width/height as long as width * height = x_size * y_size * s_zize. This loose checking was already used for the JPEG format.

Fixes https://github.com/google/tensorstore/issues/196