This pull request adds support for loading JPEG images in the WebAssembly version of the basis_universal library. Previously, only PNG images were supported in the wasm version.
To use the new feature, users can specify the type of source image by passing a number to the basis_universal library, where 1 represents a PNG image and 2 represents a JPEG image.
Here's an example code snippet that shows how to use the new setSliceSourceImage function with a JPEG image:
// 1 represent png file, 2 for jpg, 0 for raw image data
var type = 1;
basisEncoder.setSliceSourceImage(0, new Uint8Array(data), 0, 0, type);
Fix #351
This pull request adds support for loading JPEG images in the WebAssembly version of the basis_universal library. Previously, only PNG images were supported in the wasm version.
To use the new feature, users can specify the type of source image by passing a number to the basis_universal library, where 1 represents a PNG image and 2 represents a JPEG image.
Here's an example code snippet that shows how to use the new setSliceSourceImage function with a JPEG image: