Replace Jimp#1152
Draft
wswebcreation wants to merge 4 commits into
Draft
Conversation
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
jimpis no longer actively maintained, t has seen no releases in over a year and shows minimal PR/issue activity. It was originally chosen to avoid the system-level install requirements ofnode-canvas(GTK, Cairo, etc.), but it now carries its own maintenance risk.This PR replaces jimp with an approach that keeps the same guarantee, no binary dependencies, no OS-level installs, pure JavaScript, while using actively maintained libraries. The image codec is replaced by
fast-png(v8.0.0, maintained by the image-js / Zakodium org), and all image manipulation operations are implemented as a small in-house utility module that operates directly on raw RGBA pixel buffers.User impact
There are no intentional behaviour changes for end users. The visual comparison results, blockout regions, full-page screenshot assembly, and device rotation handling all operate identically. The
compareEnginethe is introduced in the branch we are going merge this in will be removed. We believe that we can merge this as a major release without too much impact for users.Baseline compatibility
This PR is being validated against baselines that were originally generated with jimp to confirm that the pixel-level output of the new implementation is identical. Any regression there would indicate a bug in the pure-JS pixel operations (crop, composite, rotate, resize) that needs to be addressed before merging.