Releases: gemini-testing/looks-same
Releases · gemini-testing/looks-same
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
diffClusters
withcreateDiffImage: true
now returns array ofdiffArea
ifshouldCluster: 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
jpeg
buffer, 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');