Task #12059 (new)
C++ Image rescaling/resampling
|Reported by:||rleigh||Owned by:||rleigh|
In order to implement FormatReader::openThumbBytes, a solution is needed to downscale/downsample the image. The java implementation uses java.awt.image.BufferedImage? which is obviously not an option in C++.
- OpenGL (render to offscreen framebuffer object at desired scale, with mipmaps handling smooth resampling)
- OpenCL (as for GL, but do it by hand with GPU and CPU variants)
- Hand-rolled bilinear filtering for each supported pixel type (can be templated).
- [future for NDIM: trilinear filter to give a 3D thumbnail]
The by hand bilinear filter would be the most flexible (but slow) solution.
A more fundamental question here is whether thumbnail generation really belongs in the base reader API? It might be better as a higher-level function/class which takes a reader/series and gives you a thumbnail.