You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
JPEG 2000 decoding (internal, decode-only), for the PDF bridge: JP2 files and raw codestreams, all progression orders, tiles, precincts, layers, every code-block style, the 5-3 and 9-7 wavelets, palettes, channel definitions, sYCC, reduction levels and regions; lossless streams are bit-exact and lossy ones agree with OpenJPEG within one level at 8 bits. Passes ITU-T T.803 Class 1 (52 of 52 components), refuses hostile headers before allocating (limits in docs/jpx.md), and was fuzzed for 10 minutes without findings. Tiles decode in parallel with deterministic output; a 12-bit 2048x2048x3 stream with 256 tiles takes 319 ms instead of 539. It is not in the default ImageConfiguration.
RecursiveAI.OneImage.Pdf (new package): PDF pages as an image format on OnePDF 1.2 display lists. Each page is a frame, drawn in 128 px cells on demand (a region is byte for byte the same as that part of a whole render, at any degree), at the requested size when resized. Paths, strokes, clips, text, images (JPEG, JPEG 2000 and JBIG2 decoded by OneImage; damaged JPEG 2000 and JBIG2 images are left out), shadings, tiling patterns, transparency groups (isolated, non-isolated and knockout), text and fill-and-stroke knockout, soft masks, blend modes, and form and markup annotations through OnePDF's generated appearances (PdfRenderOptions.GenerateAppearances). PdfRenderLimits bound files, images, nesting, clips and pattern tiles, with a hostile-file test each, and fuzz/run.sh pdf fuzzes the whole path. Rendering is checked against PDFium, MuPDF and pdf.js as a signal: 26 of 307 pages of OnePDF's test set are flagged for review against ISO 32000-2 (24 ambiguous, 2 where the renderer follows the specification and the references do not, none wrong), with a verdict and section for each. Known gap: soft-mask /TR is treated as identity. See docs/pdf.md.
JBIG2 decoding (internal, decode-only), for the PDF bridge: generic, refinement, symbol dictionary, text, pattern dictionary and halftone regions, MMR, custom and standard Huffman tables, striped and unknown-height pages, standalone files and PDF-embedded streams with globals. Bounded by Jbig2Limits (one crafted-stream test per limit) and fuzzed (fuzz/run.sh jbig2). Checked against T.88 Annex H and 2327 streams from public PDFs (1925 identical to pdfimages, 402 the exact inverse because of /Decode [1 0] or /ImageMask, none different). See docs/jbig2.md.
OneImage.Layers: layer styles draw gradient overlays, pattern overlays and bevel and emboss. GradientOverlayEffect and EffectGradient/EffectGradientFill (linear, radial, angle, reflected, diamond; midpoints, opacity stops, smoothness, reverse, scale, offset, align), PatternOverlayEffect with EffectPattern/EffectPatternFill (scale, link with layer, phase), BevelEmbossEffect (inner and outer bevel, emboss, pillow emboss and stroke emboss; smooth, chisel hard and soft; depth, size, soften, up or down, angle and altitude, highlight and shadow mode, color and opacity, gloss contour) and gradient or pattern paint for StrokeEffect (and a shape burst gradient) and a gradient for the outer and inner glow. LayerStyle.AlignBox sets the rectangle that aligned gradients and patterns are laid out on. The new effects have language-neutral Describe() names and bounded parameters, and are drawn per tile with the same dirty-rectangle reach as the other effects.
RecursiveAI.OneImage.Psd: gradient and pattern overlays, bevel and emboss, gradient and pattern strokes and gradient glows are read from lfx2/lmfx and drawn, and are written when a style is created or edited (a pattern that the document does not hold is added to its pattern resources). 8 more sample files are fully modelled; the files that use these effects are 1.5 to 20 levels closer to their stored composite, and the files that were modelled are unchanged. Bevels, pattern phase on text and linear dodge/burn are approximations (see the PSD page).
RecursiveAI.OneImage.Psd: PsdFile.Save writes layer styles and gradient and pattern fills that are created or edited in the model. A style that differs from the one read is written as a new effects block (lfx2) from the model, keeping the items of the original block that the model has no field for (gradient and pattern overlays, bevel and emboss, gradient strokes and glows, grain, and so on) and writing unchanged effects back as they were; an untouched style is still written back byte for byte. A new or replaced linear or radial gradient, bitmap pattern or hatch brush on a fill layer is written as GdFl/PtFl settings (patterns go to the document's pattern resources) beside its raster, and a brush with no such equivalent is written as a pixel layer instead of making Save throw. Disabled effects are now read as disabled LayerEffects instead of being left out of the style. See docs/psd.md.
Changed
WebP lossless encoding of small images uses less memory, with byte-identical output: the match-search hash table of an image of up to 16384 pixels (the picture and the predictor, color-transform and palette maps of a file) is sized to the image instead of a 1 MiB array per entropy-coded image. A 400x300 lossless encode allocates 4.9 MB instead of 12 MB and a 2000x1500 one 44 MB instead of 54 MB. The lossy encoder is unchanged: its 2000x1500 source planes are needed in full, and the thumb-webp gate row's excess over native encoders is one-time JIT cost (see docs/performance.md). gate-peak takes an optional GATE_WARMUPS=N to show that cost; the default stays one warm-up.
Progressive JPEG decoding is much faster, with identical output. Refinement scans read their correction bits through a mask of the nonzero coefficient positions instead of one coefficient at a time, and the scans of a progressive Huffman file of 1 MP or more decode side by side, each waiting only for the rows of earlier scans it depends on; rows reach the transform while the last scan is still running. On a 24 MP file: 389 to 68.5 ms (noisy) and 199 to 62.3 ms (smooth) at full size, 38.5 to 12.8 ms at 1/8 scale (ImageSharp 3.1.12: 432 and 210 ms; NetVips: 404 and 257 ms). A progressive file that fails in a late scan may now deliver some rows to the destination before the exception, as the streaming decoders already do; the exception is the same as before.
Fixed
RecursiveAI.OneImage.Text: hinting no longer lets a hostile font throw out of the interpreter: ABS, the cut-in compares of MIAP/MIRP/MDRP and the other absolute values no longer overflow on the most negative integer, and ISECT divides in 128 bits. The twilight zone is now kept as the control value program leaves it (each glyph starts from a copy), so fonts whose prep places twilight points hint as intended. All programs of one top-level glyph share a budget of 2^20 instructions; a composite that exceeds it is drawn unhinted instead of costing up to 2^18 per component.
RecursiveAI.OneImage.Psd: a pattern channel whose rectangle claims more data than the file holds is refused before its buffer is allocated, and the linear-light interpolation of a gradient glow is written and read back like that of other gradients.
OneImage.Layers: an edit of a layer's pixels now also recomputes the tiles that an inner effect (inner shadow, inner glow, inside stroke) draws from the edited shape, not only the ones outer effects reach. The pixels were correct after a fresh render; an incremental render could leave a stale tile next to the edit.
RecursiveAI.OneImage.Psd: an effect contour with a point that is not a number, or two points a hair apart that become one float, is skipped and counted in EffectsNotDrawn instead of throwing an argument exception (found by fuzzing).