Skip to content

Conversation

@teimurjan
Copy link

@teimurjan teimurjan commented Sep 9, 2025

Description

Replace pixelmatch with BlazeDiff. BlazeDiff is 50% faster than pixelmatch, using the same API and producing the same results. It weighs twice as much, is actively supported, and is type-safe out of the box.

Screenshot 2025-09-12 at 15 51 26

It's already been checked and integrated into:

  1. vega/vega
  2. ant-design/ant-design
  3. antvis/g
  4. apexcharts/apexcharts.js

This Pull Request meets the following criteria:

For new components:

  • Unit and visual regression tests have been added/adjusted for my new feature
  • New Components are registered in index.js of my project
  • New Components have d.ts files and are exported in index.d.ts

Description by Callstackai

This PR replaces the pixelmatch library with BlazeDiff for image comparison, improving performance and maintaining the same API.

Diagrams of code changes
sequenceDiagram
    participant IconSystem
    participant FileSystem
    participant BlazeDiff
    participant PNG

    IconSystem->>FileSystem: Read existing icon SVG
    IconSystem->>FileSystem: Get new icon SVG content
    
    IconSystem->>IconSystem: Convert existing SVG to PNG
    IconSystem->>IconSystem: Convert new SVG to PNG
    
    IconSystem->>PNG: Create new PNG with dimensions
    IconSystem->>BlazeDiff: Compare PNG pixel data
    Note over BlazeDiff: Compare existing vs new icon
    BlazeDiff-->>IconSystem: Return number of different pixels
Loading
Files Changed
FileSummary
packages/orbit-components/config/fetchIcons.mtsReplaced pixelmatch with BlazeDiff for image comparison.
packages/orbit-components/package.jsonUpdated dependencies to include @blazediff/core and removed pixelmatch.

This PR includes files in programming languages that we currently do not support. We have not reviewed files with the extensions .mts, .json. See list of supported languages.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant