Releases: gemini-testing/looks-same
Releases · gemini-testing/looks-same
v10.0.0
What's new
- In this release, we got rid of sharp. Now "looks-same" package has no compiled dependencies, so there should be no errors trying to install looks-same version on old/new version of node.js.
- Increased performance when comparing images with lots of different pixels (up to 3x)
- Improved result difference images compression
- Reduced total "node_modules" size (41M -> 660K)
💣 Breaking changes
- formats, other than png, are not supported
Dependencies size change:
Before:
❯ pnpm add looks-same@9
Packages: +65
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Progress: resolved 65, reused 50, downloaded 15, added 65, done
node_modules/.pnpm/[email protected]/node_modules/sharp: Running install script, done in 2.7s
dependencies:
+ looks-same 9.0.1
Done in 5s
❯ du -cksh *(D) | sort -hr
41M total
41M node_modules
16K pnpm-lock.yaml
4.0K package.json
After:
❯ pnpm add looks-same@10
Packages: +7
+++++++
Progress: resolved 7, reused 5, downloaded 2, added 7, done
dependencies:
+ looks-same 10.0.0
Done in 1.3s
❯ du -cksh *(D) | sort -hr
668K total
660K node_modules
4.0K pnpm-lock.yaml
4.0K package.json
v10.0.0-rc.0
💣 Breaking changes
- node versions less than 18.7.0 are no longer supported
💬 Common
- update sharp to 0.33.2 which install libvips from npm and not from gh (more info here). Moreover new version weighs 1.1Mb vs 27Mb (previous version).
- this version available by
npm i hermione@next
v9.0.0
v8.2.4
🐛 Bug fixes
diffClusterswithcreateDiffImage: truenow returns array ofdiffAreaifshouldCluster: false
v8.2.3
🐛 Bug fixes
out of bounds with createDiffImage: true
v8.2.2
🐛 Bug fixes
fix typings for looksSame with createDiffImage: true
v8.2.0
🚀 Improvements:
Add an ability to calculate image difference and image equality simultaneously
If you need both co compare images and create diff image, you can pass option createDiffImage: true,
it would work faster than two separate function calls:
const {
equal,
diffImage,
differentPixels,
totalPixels,
diffBounds,
diffClusters
} = await looksSame('image1.png', 'image2.png', {createDiffImage: true});
if (!equal) {
await diffImage.save('diffImage.png');
}v8.1.0
🚀 Improvements:
-
looks-same now supports the following image formats:
heic,heif,avif,jpeg,jpg,png,raw,tiff,tif,webp,gif,jp2,jpx,j2k,j2c -
If you want to build diff image as
jpegbuffer, you can do:await looksSame.createDiff({ reference: '/path/to/reference/image.png', current: '/path/to/current/image.png', extension: 'jpeg', });
v8.0.0
💣 Breaking changes
- drop support of node versions less than 12
- drop old node-style callback interface support
How it used before:
looksSame('image1.png', 'image2.png', function(error, {equal}) {
// ...
});
How it use now:
const {equal} = await looksSame('image1.png', 'image2.png');