Repository navigation
0.4.0
Fixed
- Progressive JPEG decoding now correctly accumulates DCT coefficients across multiple scans by
deferring IDCT until all scans complete, fixing issues with half-decoded or corrupted-looking
progressive images - Successive approximation in progressive JPEGs now properly handled: high-bit scans (Ah=0, Al>0)
and refinement scans (Ah>0) correctly accumulate bit-precision, eliminating blocky/low-resolution
appearance in images with successive approximation encoding - DC predictor now correctly resets at the start of each scan per JPEG specification, preventing
coefficient accumulation artifacts across scans
Added
- Progressive JPEG support in pure JavaScript decoder - can now decode both baseline (SOF0) and
progressive (SOF2) JPEGs without requiring runtime APIs, including full successive approximation
bit-refinement support createImageBitmap+OffscreenCanvasfallback for JPEG decoding in environments with canvas
APIs available- Comprehensive tests for progressive JPEG decoding in
test/formats/jpeg_progressive.test.ts
Changed
- Removed all
console.log,console.warn, andconsole.errorstatements from library code;
non-fatal warnings are reported throughImageDecoderOptions.onWarning - Fallback behavior (pure-JS to runtime APIs) is silent by default
Image.decodeandImage.decodeFramesnow acceptImageDecoderOptions(tolerantDecoding,
runtimeDecoding,onWarning)Image.encode("jpeg", ...)now honorsqualityandprogressiveviaJPEGEncoderOptions
(exported frommod.ts)TIFFEncoderOptionsnow exported frommod.ts(no longer re-exported from the TIFF format
module)
Breaking
- Renamed
*EncodeOptionstypes to*EncoderOptionsfor consistency withImageDecoderOptions ASCIIOptionsremoved; useASCIIEncoderOptions- Encoding APIs (
Image#encode,Image.encodeFrames, andImageFormat.encode*) no longer accept
decode options - Per-decoder option types (
JPEGDecoderOptions,GIFDecoderOptions,WebPDecoderOptions) removed
in favor ofImageDecoderOptions
Full Changelog: v0.3.0...v0.4.0