I’m having a hard time finding a 16-bit jpg decoder. Does anyone know one I have fast-png for png images and that’s exactly what I need.
import{decode} from 'fast-png';
const arrayBuffer = await(await fetch('./resources/textures/depth1.png')).arrayBuffer();
const imageData = await decode(arrayBuffer); //16 bit decoder
const data = imageData.data;
This works great, even with very large image files. However, png’s have the disadvantage that they use significantly more memory and take longer to load than jpg, so I’m looking for an equivalent solution for jpg. I haven’t found anything that is comparable to fast-png for jpg files.