Skip to content

0.4.0

Choose a tag to compare

@Hexagon Hexagon released this 14 Dec 23:46
· 41 commits to main since this release
c91aa37

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 + OffscreenCanvas fallback 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, and console.error statements from library code;
    non-fatal warnings are reported through ImageDecoderOptions.onWarning
  • Fallback behavior (pure-JS to runtime APIs) is silent by default
  • Image.decode and Image.decodeFrames now accept ImageDecoderOptions (tolerantDecoding,
    runtimeDecoding, onWarning)
  • Image.encode("jpeg", ...) now honors quality and progressive via JPEGEncoderOptions
    (exported from mod.ts)
  • TIFFEncoderOptions now exported from mod.ts (no longer re-exported from the TIFF format
    module)

Breaking

  • Renamed *EncodeOptions types to *EncoderOptions for consistency with ImageDecoderOptions
  • ASCIIOptions removed; use ASCIIEncoderOptions
  • Encoding APIs (Image#encode, Image.encodeFrames, and ImageFormat.encode*) no longer accept
    decode options
  • Per-decoder option types (JPEGDecoderOptions, GIFDecoderOptions, WebPDecoderOptions) removed
    in favor of ImageDecoderOptions

Full Changelog: v0.3.0...v0.4.0