- Inferno Colormap: Added the perceptually-uniform
infernocolormap (black→purple→orange→yellow) toimage/colormaps.zig, wired intoImage.applyColormap, the PythonColormap.inferno()factory, and thecolormaps_demo/ global-optimization web examples. - Global Optimization: Added a derivative-free, bound-constrained global optimizer (MaxLIPO + Trust Region) —
GlobalOptimizerandfindGlobalOptimuminsrc/optimization/, supporting mixed integer/continuous search spaces and optional parallel objective evaluation throughIo. - Symmetric Eigendecomposition: Added
Matrix.eigh, a cyclic-Jacobi eigendecomposition of symmetric matrices that recovers signed eigenvalues (handles indefinite matrices, unlike SVD), plus aMatrix.diagonalconstructor that builds a diagonal matrix from a vector (dlib'sdiagm). - BMP Codec (#348): Native Zig BMP reader and writer with no third-party dependencies.
- Decoder covers BITMAPCOREHEADER (OS/2 v1) / BITMAPINFOHEADER / V4 / V5 (with v2/v3 tolerated as INFOHEADER variants), 1/4/8/16/24/32 bpp, BI_RGB / BI_BITFIELDS / BI_ALPHABITFIELDS / BI_RLE4 / BI_RLE8 compressions, and both bottom-up and top-down row order.
- Encoder writes 24bpp BI_RGB for
Image(Rgb), 32bpp BI_BITFIELDS with canonical RGBA masks forImage(Rgba), and optional 8bpp linear-gray indexed forImage(u8)(viaEncodeOptions.use_palette_for_grayscale). - Wired into
Image(T).load/savefor.bmpextension, the CLIinfocommand, and the Python bindings (Image.load("foo.bmp")/Image.save("foo.bmp")).
- GIF Codec: Native Zig GIF reader and writer with no third-party dependencies.
- Decoder covers GIF87a/89a, 1/4/8-bit indexed, all four disposal methods (
unspecified,do_not_dispose,restore_to_background,restore_to_previous), interlaced images, and the NETSCAPE2.0 application extension for loop counts. - Multi-frame access via
gif.loadAnimated/gif.loadAnimatedFromBytesreturns anAnimatedImage(T)of fully-composed frames — disposal, transparency, and de-interlace are absorbed inside the codec. - Encoder writes single-frame GIFs (
gif.encode/gif.save) with built-in median-cut quantization and optional Floyd–Steinberg dithering, plus animated GIFs (gif.encodeAnimated/gif.saveAnimated) with per-frame LCT or a caller-supplied global palette and transparent-index handling forImage(Rgba)inputs. - Wired into
Image(T).load/savefor.gifextension and into the CLIinfocommand (prints version, dimensions, frame count, loop count, palette size). - Python bindings:
Image.load("foo.gif")andImage.save("foo.gif")work for single-frame GIFs.
- Decoder covers GIF87a/89a, 1/4/8-bit indexed, all four disposal methods (
AnimatedImage(T)Container: New generic container insrc/image/animated.zigfor animated raster formats (GIF today, designed for future APNG/WebP). Holds composed frames, per-frame delays in centiseconds, and loop count.- Reusable Quantization & Dithering: Extracted color quantization and dithering from
sixel.ziginto shared, public modulesimage/quantize.zigandimage/dither.zig. Both sixel and the new GIF encoder consume them.quantize.medianCutfor adaptive palette generation,quantize.ColorLookupTablefor fast nearest-color lookup, plus fixed palettes (linear_gray_256,vga16_palette,fixed6x7x6Palette,web216Palette).dither.Mode(none,floyd_steinberg,atkinson,ordered,auto) withdither.apply,dither.applyFloydSteinberg,dither.applyAtkinson,dither.applyOrdered.
- iTerm2 Inline Image Protocol: Added
terminal.iterm2— PNG-encodes and base64-wraps an image into the iTerm2OSC 1337inline-image sequence, with the same aspect-preserving scaling as the kitty/sixel encoders. Wired intoDisplayFormat(new.iterm2variant) and the.autodegradation chain (now kitty → iterm2 → sixel → sgr → braille), the CLI--protocol iterm2, and terminal detection (terminal.isIterm2Supported, via an XTVERSION probe matching iTerm2/WezTerm).
- Single-Threaded Build Robustness: Sixel's palette LUT cache skips its atomic spinlock under
builtin.single_threaded(avoids a latent panic onwasm32-freestanding).
- Matrix methods renamed to conventional short names (breaking):
inverse→inv,determinant→det,pseudoInverse→pinv,cholesky→chol, and the element-wise (Hadamard) producttimes→hadamard(in-placetimesBy→hadamardBy).ProjectiveTransform.inverse→inv. Applies acrossMatrix,SMatrix,Chain, and the Python bindings. RunningStatsnow takes a config argument (breaking):RunningStats(T)→RunningStats(T, config), whereRunningStatsConfig(.all/.variance/.summary) selects which quantities are tracked. Use.allfor the previous behavior.- Terminal graphics encoders grouped under
terminal(breaking): the sixel, kitty, and iterm2 encoders moved out of the top-level namespace intoterminal.*(zignal.sixel→zignal.terminal.sixel,zignal.kitty→zignal.terminal.kitty,zignal.iterm2→zignal.terminal.iterm2). The source files now live insrc/terminal/. Detection helpers (terminal.isSixelSupported,terminal.aspectScale, …) and theDisplayFormattags are unchanged.
- Zig 0.16.0 Migration: Full codebase update to support Zig 0.16.0.
- Replaced all deprecated
@intFromFloatcalls with@round,@floor,@ceil, or@trunc. - Leveraged new result type coercion for rounding built-ins to simplify type casting.
- Updated
std.Ioandstd.BuildAPI usage to match latest standard library changes. - Transitioned to unmanaged containers requiring explicit allocators.
- Replaced all deprecated
- Dimension Standardization: Standardized image and matrix dimensions/indices to
u32across the library. (#292, #295, #321)
- CLI Subcommands: Added a robust CLI with
blur,edges,metrics,stats,resize,tile,fdm,info, andversioncommands using declarative argument parsing. (#291, #294, #308, #312, #314, #317) - Hough Transform: Implemented Hough transform for line detection with optimized integer arithmetic and 1D lookup tables. (#326)
- Edge Vectorization: Added
Tracerfor converting edge maps into vectorized paths. - Advanced Interpolation: Added Mitchell and Lanczos3 resizing methods with LUT optimizations. (#299, #300)
- Cholesky Decomposition: Added high-performance Cholesky decomposition for symmetric positive-definite matrices. (#322)
- Colormap Support: Added built-in colormaps (Heat, Jet, etc.) for data visualization. (#336)
- PCF Font Writing: Added support for writing fonts in PCF format. (#337)
- Sixel RLE: Implemented run-length encoding in the Sixel encoder for smaller output sizes. (#302)
- Image Difference: Added utility to compute visual and statistical differences between images. (#309)
- Generic Blending: Expanded blending modes to support generic float pixel types. (#335)
- Interpolation API: Sampling methods now require an explicit
BorderMode. (#329) - Rectangle API: Updated
Rectanglemethods to takePointtypes instead of individual coordinates. (#333) - Random Matrices: Matrix generation now requires an explicit
seedfor reproducibility.
- SIMD Optimizations: Vectorized IDCT, color conversion, and convolution inner loops. (#307, #341)
- Fast CRC: Implemented slice-by-8 CRC calculation for PNG encoding/decoding. (#304)
- Memory Optimization: Removed redundant allocator field from
HuffmanTable, reducing memory footprint per table instance.
- Rounding Accuracy: Improved numerical precision by replacing manual truncation-based rounding with the
@roundbuilt-in. - Infallible Operations: Made
resizeandletterboxinfallible by handling edge cases internally. (#334) - Border Handling: Improved rotation and interpolation to consistently respect border modes. (#329, #331)
- PNG Alpha: Correctly extract alpha channel for grayscale images. (#330)
- JPEG Robustness: Improved restart marker handling and MCG decoding stability.
- Negative Rounding: Fixed incorrect rounding logic for negative values in fixed-point constants.
- Convex Hull Bounds:
ConvexHull.getRectangle()(and Python'sget_rectangle()) returns the tightest axis-aligned rectangle for the cached hull, simplifying ROI extraction from arbitrary point clouds. (#232) - Resource Limits in Image Loading: Enforce resource limits during image loading to prevent excessive memory usage. (#234)
- Scalar Type Conversion for Transforms: Added scalar type conversion methods to geometry transforms. (#239)
- Matrix Element Type Conversion: Added method to convert matrix element types. (#238)
- Python Sequence Conversion: Added sequence conversion and improved memory error handling in Python bindings. (#244)
- Python Grayscale Dtype Rename: Renamed
Grayscaledtype toGrayin Python bindings. (#246) - Color Scalar Handling: Generalized scalar color handling to all floats, potentially changing behavior for non-f32 scalars. (#245)
- Python Color Validation: Added validation for color component range (0-255), now raising errors for invalid values. (#243)
- Geometry Transform Allocators: Removed allocator field from transform structs. (#240)
- Integral Images: Prevent initialization of empty images in integral image operations.
- Python Wheels: Use explicit Zig targets instead of native for better cross-platform compatibility. (#241)
- PNG IEND Chunk: Enforce requirement for mandatory IEND chunk in PNG decoding.
- PNG Critical Chunk Ordering: Validate critical chunk ordering in PNG files. (#233)
- Updated Image I/O description in README.
- Updated CI to use Zig master version. (#236)
- Updated macOS runners in CI matrix. (#231)
- Bumped minimum required Zig version.
- Matrix Norm APIs: Replaced the single
Matrix.norm(kind)entry point with explicit helpers (frobenius_norm,l1_norm,max_norm,element_norm,schatten_norm,induced_norm,nuclear_norm,spectral_norm) across the Zig core and Python bindings. Update callers to the specific method that matches the desired metric. - Mean Pixel Error Scaling:
Image.meanPixelError(and the PythonImage.mean_pixel_error) now returns a normalized value in[0, 1]instead of a percentage. Multiply by 100 if you still need percent output.
- Geometry Rectangles: Added center/corner accessors, translation & clipping helpers, and coverage utilities to
Rectangle, with parity in the Python bindings. Overlaps now treat threshold checks as inclusive so1.0truly means “fully covered”. - Matrix Norm Suite: Introduced element-wise, Schatten, induced, nuclear, and spectral norm implementations backed by the improved SVD helpers, plus error reporting when invalid exponents are supplied.
- Image Loading:
Image.loadFromBytes(and Python’sload_from_bytes) can decode PNG/JPEG images directly from any byte buffer or buffer-protocol object without hitting the filesystem, sharing the same validation as file-based loads. - Color & Canvas Enhancements: All color structs gain a generic
invert()method (exposed to Python) and the canvas line renderer now applies fractional endpoint fading for smoother anti-aliased strokes. - Image Metrics: Added
meanPixelErrorfor structural comparisons alongside PSNR/SSIM, updated examples that visualize the metric suite, and exposed the API to Python. - Examples: New “Contrast Enhancement” WASM demo showcases autocontrast and histogram equalization controls with cleaner web UI wiring.
- Planar Integral Images: Box-blur and summed-area table routines now use a unified planar integral representation, reusing the optimized kernels per channel to speed up large RGB/RGBA blurs while simplifying the API surface.
- Matrix Ops: Binary operations (
add,sub,times,gemm) now short-circuit when the second operand already carries an error, preventing misleading results. - Transforms: Similarity, affine, and projective fits explicitly return
error.NotConverged/error.RankDeficientwhen SVD solvers fail, with Python raisingValueErrorfor degenerate point sets instead of silently emitting bad matrices. - ORB & Feature Matching: Brute-force matchers only free successfully allocated slices and ORB scale handling no longer panics on
scale_factor <= 1.0. - Canvas: Thick transparent lines switch to per-pixel blending so alpha is preserved, and docs clarify how
drawLineblends colors. - Fonts: PCF format flags use the correct masks and bounds checks, while the BDF parser now handles glyph rows wider than 32 bits by decoding hex data byte-by-byte.
- Updated Python README structure/quickstart, added a download badge, and refreshed example instructions to reflect the new metrics/contrast demos.
- Convolution Pipeline: Added SIMD-accelerated inner loops and early-outs when all three color channels share identical data, cutting blur runtimes substantially on large uniform regions.
- Terminal Rendering: Reworked the sixel encoder with improved palette generation, chunking heuristics, and profiling hooks to lower output size and CPU time for high-resolution frames.
- Matrix GEMM: Correctly handles
Aᵀ * Bᵀpaths when dispatching to SIMD kernels, eliminating shape-related crashes in advanced linear algebra workflows. - PNG Decoder: Fixed 16-bit pixel extraction offsets to stop channel swapping in high bit-depth images.
- JPEG Decoder: Hardened restart-marker handling and memory management to avoid buffer overruns on truncated streams.
- Feature Distribution Matching: Ensures color-source matching respects grayscale targets, yielding stable feature histograms.
- Rectangle Geometry: Tightened overlap/containment logic for greater numerical stability in downstream layout calculations.
- Canvas Drawing: Floors floating-point coordinates before pixel writes, preventing occasional off-by-one artefacts.
- Image Metrics Module: Consolidated PSNR/SSIM helpers into
image/metrics.zig, simplifying reuse from examples and keepingimage.ziglean. - Examples: Added an image-quality metrics showcase and refreshed web demos to highlight the new encoder improvements.
- Structural Similarity Index (SSIM): Added
Image.ssimto compute perceptual similarity using the standard 11×11 Gaussian window and Rec. 709 luminance weighting, with support for grayscale and RGB/RGBA data.
- Moore–Penrose Pseudoinverse: Added
Matrix.pseudoInversewith tolerance controls and rank reporting, enabling stable solutions for rectangular systems. - Improved Affine Fitting:
AffineTransform.initnow uses the pseudoinverse to support overdetermined point sets while preserving numerical stability.
- Image Processing Outputs: All image filters and morphology routines now expect the caller to supply an initialized output image (
Image.initLike/dupe).Image.cropandImage.rotatereturn freshly allocated images instead of writing through an output pointer. - Geometry Point API: Replace
Point.point(...)with the newPoint.init(...)constructor; the legacy helper has been removed. - Meta Utilities:
meta.clampU8/clampTohave been consolidated into the genericmeta.clamp(T, value)helper and must be updated accordingly.
- Unified Border Handling: Introduced
image/border.zigto centralize zero, replicate, mirror, and wrap modes used across convolution and order-statistic filters. - Running Statistics:
RunningStatsgains an explicit.init()constructor, clearer reset semantics, and broader edge-case coverage in tests. - Matrix Errors: Added
MatrixError.NotConvergedso SVD-backed routines report convergence failures instead of silently returning invalid data.
- PCA: SIMD-accelerated
project/reconstructpaths for f32 and f64 reduce latency on high-dimensional datasets.
- Compression: Deflate encoder/decoder now clear internal state when reused, preventing cross-run contamination.
- Canvas: Row indexing honors image stride, fixing drawing artifacts on non-contiguous buffers.
- Geometry:
Rectangle.containsrejects NaN inputs andRectangle.overlapscorrectly enforces the configured IoU threshold. - Edge Detection: Corrected source/destination ordering during gradient copying, fixing regression in the edges module.
- Python Toolchain: Minimum supported Python bumped to 3.10 with full CI coverage through Python 3.14.
- Docs: Expanded Python README with badges, feature overview, and clarified version matrix.
- Binary Image Operations: Complete thresholding and morphology suite
- Otsu and adaptive mean thresholding
- Morphological operations: erosion, dilation, opening, closing
- Order-Statistic Filters: Median, minimum, maximum blur filters
- Edge-preserving noise reduction with configurable kernel sizes
- Image Enhancement: Histogram equalization and autocontrast
- Adaptive contrast enhancement for improved visibility
- Edge Detection: Advanced edge detection algorithms
- Canny Edge Detection: Classic multi-stage edge detector with Gaussian smoothing, Sobel gradients, non-maximum suppression, and hysteresis thresholding
- Shen-Castan: Edge detection with ISEF smoothing and adaptive gradient computation
- Canvas Drawing: Added
drawImagemethod for image compositing- Support for blending modes during insertion
- JPEG Encoder: Complete baseline JPEG encoding implementation
- DCT-based compression with quality control
- Support for grayscale and RGB images
- Optimized encoding performance
- Deflate/Zlib/Gzip: Full compression implementation
- Multiple compression levels and strategies
- Dynamic Huffman encoding
- LZ77 hash-based compression
- Compatible with standard zlib format
- Chainable Operations API: Simplified matrix operations
- Direct method chaining:
matrix.transpose().inverse().eval() - Deferred error checking at terminal operations
- Added
dupe()method for explicit copying
- Direct method chaining:
- Image Processing: Removed
differenceOfGaussians, easy to do manually - Matrix API: Removed
OpsBuilder, merged functionality intoMatrix- Use
ArenaAllocatorfor managing intermediate allocations in chains - All SIMD optimizations preserved
- Use
- YCbCr Color Space: Components now use
u8type instead of other numeric types - Alpha Compositing: Corrected blend mode compositing behavior
- Image Module Reorganization: Separated into focused sub-modules
image/binary.zig- Binary operations and morphologyimage/convolution.zig- Convolution frameworkimage/edges.zig- Edge detection algorithmsimage/enhancement.zig- Histogram and contrast operationsimage/histogram.zig- Histogram computationimage/integral.zig- Integral image operationsimage/motion_blur.zig- Motion blur effectsimage/order_statistic_blur.zig- Order-statistic filters
- Compression Modules: Modular compression implementation
- Separate modules for deflate, zlib, gzip, huffman, and LZ77
- ORB Feature Detection: Improved with learned BRIEF patterns
- Standardized argument parsing with
py_utils.kw()helper - Numeric validators for consistent error messages
- Unified enum registration system via
enum_utils.zig - Consolidated type registration with compile-time tables
- Reduced boilerplate with
moveImageToPythonhelper
- SIMD-optimized f32 separable convolution
- Vectorized DoG and Gaussian blur calculations
- Optimized JPEG encoding with fast DCT
- Improved PNG compression configuration
- Fixed alpha compositing for blend modes
- Corrected JPEG restart marker handling and partial MCU decoding
- Improved PNG filter selection alignment with spec
- Fixed DoG filter output with offset handling
- Better memory management for convolution operations
No changes, just fixed a bug in Python
- ORB Feature Detection: Complete ORB (Oriented FAST and Rotated BRIEF) implementation
- FAST corner detection with non-maximal suppression
- Binary descriptor extraction with rotation invariance
- Feature matching with Hamming distance
- KeyPoint structure with orientation and scale support
- Hungarian Algorithm: Optimal assignment problem solver for feature matching
- Image Pyramid: Multi-scale image representation for feature detection
- Convolution Framework: Generic convolution with customizable kernels
- Gaussian blur with configurable sigma
- Difference of Gaussians (DoG) for edge detection
- Sobel edge detection with gradient magnitude
- Motion Blur Effects: Linear and radial motion blur with SIMD optimization
- Advanced Blending: 12 blend modes (normal, multiply, screen, overlay, soft light, etc.)
- Image Transforms: Extraction, insertion, warping, and perspective transforms with interpolation
- Channel Operations: Generic operations on individual color channels
- PSNR Calculation: Peak Signal-to-Noise Ratio for quality assessment
- Border Handling: Set borders, extract rectangles, and handle edge modes
- Refactored Image Module: Separated into logical sub-modules
- Core image operations in
image.zig - Filtering operations in
image/filtering.zig - Transform operations in
image/transforms.zig - Channel operations in
image/channel_ops.zig
- Core image operations in
- Dynamic SVD: Separated static and dynamic SVD implementations
- Enhanced PCA: Runtime dimension support with batch operations
- Font System Overhaul: Dynamic Unicode support with full 8x8 character set
- SIMD-optimized motion blur and convolution operations
- Channel-separated processing for improved cache locality
- Optimized integral image computation
- Fast paths for axis-aligned image extraction
- Vectorized filtering with boundary handling
- Breaking: Renamed enums for consistency
InterpolationMethod→InterpolationBlendMode→Blending- ANSI display modes renamed to SGR
- Breaking: Rectangle bounds are now exclusive (was inclusive)
- Breaking: Image constructors renamed for clarity
initBlank→initinitFromSlice→fromSlice
- Breaking:
isViewrenamed toisContiguous - Blur methods renamed:
boxBlur→blurBox, addedblurGaussian
- Support for 4:4:4, 4:2:2, and 4:1:1 chroma subsampling
- Improved component detection and color space handling
- Fixed filter operations on non-contiguous image views
- Corrected integral image boundary access
- Fixed Sobel gradient magnitude scaling
- Improved arc antialiasing in canvas drawing
- Canvas.fillRectangle now properly uses alpha blending in .soft mode
- drawLine has some fixes in the drawLineXiaolinWu algorithm
- examples add an example to showcase more drawing stuff
- Image Scaling Support: Terminal graphics protocols now support image scaling
- Sixel: Added optional
widthandheightfields tosixel.Optionsfor image scaling - Kitty: Added optional
widthandheightfields tokitty.Optionsfor image scaling - Allows images to be scaled (preserving aspect-ratio) before transmission to terminal
- Sixel: Added optional
- Terminal Architecture: Refactored terminal state management
- Encapsulated state management in new
terminal.zigmodule - Replaced
TerminalSupport.zigwith more modular design
- Encapsulated state management in new
- Sixel Processing: Refactored image processing pipeline
- Color lookup table now implemented as value type
- Optimized image preparation for dithering
- Better separation of concerns in processing stages
- Optimized Sixel color quantization and dithering preparation
- More efficient color lookup table implementation
- PCF Font Loading: Complete PCF (Portable Compiled Font) format support
- All PCF table types including metrics, bitmaps, encodings
- Compressed PCF support with automatic decompression
- Efficient glyph lookup and rendering
- BDF Font Support: Comprehensive BDF (Bitmap Distribution Format) implementation
- Loading and parsing of BDF font files
- Saving fonts back to BDF format
- Support for gzipped BDF files (.bdf.gz)
- Unicode properties and glyph metadata preservation
- Built-in Font: Default 8x8 bitmap font for immediate text rendering
- Text Rendering: Canvas text drawing with bitmap fonts with optional antialiasing
- Unified Point System: New tuple literal syntax for point construction
- Simplified API:
Point(2, f32)instead ofPoint2d(f32) - Consistent interface across all dimensions
- Simplified API:
- Bounds Management: Improved clipping and bounds checking
- Better handling of drawing operations near image edges
- Guards against empty fill regions
- Optimized rectangle clamping to image bounds
- Image Scaling: New scaling method for flexible image resizing
- PixelIterator: For sequential pixel traversal
- Matrix Decomposition: Enhanced decomposition methods
- Improved numerical stability
- Comprehensive test coverage
- Better error handling
- Point types now use unified syntax across the library
- Canvas drawing methods have improved parameter validation
- Font module reorganized for better modularity
- Image Interpolation: Comprehensive interpolation methods for high-quality image resizing
- Nearest neighbor, bilinear, bicubic algorithms
- Catmull-Rom, Lanczos, and Mitchell filters
- SIMD-optimized kernels for RGBA operations (2-5x performance improvement)
- Display Formats: Multiple terminal graphics protocols
- ANSI full/half-block display for wide terminal compatibility
- Sixel graphics protocol with adaptive palette generation
- Kitty graphics protocol for native terminal rendering
- Braille pattern display for monochrome graphics
- Module Refactoring: Split monolithic
image.ziginto organized sub-modulesimage/image.zig- Core image functionalityimage/interpolation.zig- Interpolation algorithmsimage/display.zig- Display format implementationsimage/format.zig- Format detection and handling- Comprehensive test modules for each component
- Color management with proper color space encoding support
- Optimized adaptive filter selection for better compression
- Fixed filter mode for specialized use cases
- Performance improvements in encoding pipeline
- Image saving now uses object methods:
image.save(path)instead of static functions - Matrix GEMM parameters reordered for clarity
- Exposed
InterpolationMethodtype for public API use - PNG comments updated to Zig doc comment style
- Sixel adaptive palette generation for better color accuracy
- Seam carving edge cases with memmove optimization
- SIMD kernels for 4xu8 (RGBA) interpolation operations
- Optimized PNG filter selection with adaptive sampling
- Reduced allocations in feature distribution matching
- Memory-efficient seam carving implementation
- Native Image Type: Generic
Image(T)supporting any pixel type (u8, RGB, RGBA, etc.) - Memory-Efficient Views: Sub-images that share memory with parent images (zero-copy)
- Image I/O: Native codecs with no external dependencies
- PNG: Full codec with comprehensive format support
- All PNG color types: RGB, RGBA, Grayscale, Palette
- 8-bit and 16-bit depths, interlaced images
- Transparency and gamma correction support
- JPEG: Decoder for most common variants
- Baseline and progressive JPEG support
- YCbCr and grayscale color spaces
- High-quality decoding with proper color space handling
- PNG: Full codec with comprehensive format support
- Image Transformations: Resize, crop, rotate, flip operations
- Pixel-Level Operations: Direct pixel manipulation with type safety
Comprehensive color space ecosystem with seamless conversions:
- sRGB Family:
Rgb,Rgba(packed struct for WASM efficiency) - Perceptual:
Hsl,Hsvfor intuitive color manipulation - Lab Family:
Lab,Lchfor perceptually uniform editing - Modern:
Oklab,Oklchfor improved perceptual uniformity - Device:
Xyz,Lmsfor color science applications - Specialized:
Xyb,Ycbcrfor advanced workflows
Key Benefits:
- Runtime compatibility checks for RGB operations
- Automatic conversion between any color spaces
- Consistent API across all color types
- Optimized packed structs for WASM interoperability
- Primitives:
Point,Rectanglewith comprehensive operations - Transform System: Projective, Affine, and Similarity transforms using homogeneous coordinates
- Convex Hull: Efficient convex hull computation for point sets
Advanced 2D rendering with antialiasing:
- Primitives: Lines, circles, polygons with smooth rendering
- Curves: Quadratic and cubic Bézier curve support
- Filled Shapes: Polygon filling with antialiasing
- Coordinate Transforms: Full transform pipeline support
Comprehensive matrix operations:
- Generic Matrix:
Matrix(T)for any numeric type - SVD Decomposition: High-precision Singular Value Decomposition (ported from dlib)
- GEMM Operations: Optimized matrix multiplication
- Chainable Matrix Operations: Fluent API directly on Matrix type for complex operations
- Static Matrices:
SMatrixfor compile-time sized matrices
- PCA Implementation: Full PCA with eigenvalue decomposition
- Dimensionality Reduction: Project data to lower dimensions
- Visualization: Built-in support for 2D/3D projections
- Example Applications: Face alignment, data visualization
- Feature distribution matching for domain adaption
- Perlin Noise: High-quality noise generation for textures and terrain
- Configurable: Adjustable frequency, amplitude, and octaves
- 2D/3D Support: Generate noise in multiple dimensions