Skip to content

v0.1.0-preview.6

Pre-release
Pre-release

Choose a tag to compare

@github-actions github-actions released this 13 Nov 15:08
· 440 commits to main since this release
e2eafb4

Highlights

  • Platform JPEG decoders (#374–#377). JPEG images can decode with SkiaSharp's SKCodec, ImageIO (Apple), BitmapFactory (Android) or WIC (Windows), behind the platform image decoder seam, scaled to the size they are drawn. The managed decoder stays the default where it is faster or must be bit-exact.
  • Vectorized image and color kernels (#470–#477). Vector128 kernels with scalar fallbacks for the 8 × 8 inverse DCT, YCbCr/YCCK conversion, the JPEG 2000 wavelet and component transforms, BGRA packing and premultiplication, the box filter, group compositing rows and CMYK characterization. Every kernel is bit-identical to its scalar path, and each is either faster in the browser builds or kept off there.
  • Faster JPEG 2000 (#255, #503, #505). Tier-1 decoding at about 41 ns per sample, fused rounding and level shift, and code-blocks decoded in parallel on native builds. pdfjs issue5567 page renders in Native AOT went from 227 ms to 49 ms.
  • Reduced-resolution decode in more cases (#507, #513). JPEG 2000 images without a /ColorSpace, and JPEG 2000 and JPEG soft masks, now decode at the resolution they are drawn; an image and its soft mask always reduce together. Pages with large masks open 57–77% faster zoomed out.
  • Faster image painting (#509, #511, #517). Box-filter footprints are kept across rows, averaged a run at a time, and composited a row at a time; enlarged images paint a run at a time. Painting a reduced image is 30–60% faster on JIT, Native AOT and browser AOT, and up to 9× faster in the browser interpreter for enlarged images. Output is byte-identical.
  • Sample documents (#363, #451). Representative sample documents covering text, forms, color, scans, encryption, signatures and damaged files, wired into the demos, benchmarks and browser tests.
  • Live demo: https://michaelstonis.github.io/Broadside/demo/

New API

  • SkiaImageDecoder, ImageIODecoder, AndroidImageDecoder, WicImageDecoder, with UseSkiaImageDecoder, UseAndroidImageDecoder and UseWicImageDecoder on PdfOptions.
  • PrefetchImagesAsync on AndroidCanvasBackend, CoreGraphicsRenderer and Direct2DRenderer.
  • ImageRows.PackBgra / PackRgba, YCbCrConversion.ToRgb.
  • PlatformImageRequest.ChromaHorizontalSubsampling / ChromaVerticalSubsampling, ImageHeader.IccProfile.

Fixes

  • Every backend paints an image unmasked when its soft mask can't be decoded at draw time (#515).
  • One shared default filter registry, so allocations no longer vary run to run (#498).
  • One platform decode shared across concurrent prefetches (#484).
  • Security: read an indirect KDFSalt as stored (#478); reload objects the encryption dictionary reaches once decryption is installed (#398).
  • Writing: cross-reference streams always carry /Type /XRef (#466); a source trailer's section keys are never repeated (#445); new objects are numbered correctly in a file that holds object 2147483647 (#387).
  • A reduced JPX decode stays within the header's MaxReduction (#424).
  • Blazor PdfViewer has an intrinsic height without host CSS (#393).
  • Remote files resolve named destinations off the UI thread (#420).
  • WebGL falls back to a document canvas when OffscreenCanvas has no WebGL 2 (#444).

All known issues listed for preview.5 (#420, #424, #387, #398, #393, #434, #445) are fixed.

What's Changed

Full Changelog: v0.1.0-preview.5...v0.1.0-preview.6