gemini-testing / gemini-testing/looks-same

Make the equal pixels transparent

Open
#10 4 comments 5 reactions 0 assignees View on GitHub
backlog prio:normal
Dominant language
JavaScript
Stars
827
Forks
55
PR merge metrics
No merged PRs in 30d

Description

## Need

```
As a user
I need to see the differences immediately
So that I don't struggle to see the little ones
```
## Deliverables
- [ ] Possibility to make the equal pixels of the diff image transparent
- [ ] tests

![test](https://cloud.githubusercontent.com/assets/11819686/9518408/2b46bbee-4cbf-11e5-8ef6-3aa61735d0cf.png)

![rect](https://cloud.githubusercontent.com/assets/11819686/9518409/2b479b54-4cbf-11e5-968b-e3327b86be4b.png)

![diff](https://cloud.githubusercontent.com/assets/11819686/9518407/2b4437c0-4cbf-11e5-8089-215abfbf1f92.png)
## Solution

Adding another field to the `options object`:

``` js
options = {
transparency: {Number} between 0 - 255 // default 255
};
```

Modifying the [setPixel](https://github.com/gemini-testing/looks-same/blob/9ecfb9c9458283b1b259052c2d52a9f906301594/png.js#L80) method from the `prototype` of `PNGOut`, to receive another parameter, that will be set on the `alpha channel`, i.e `this._png.data[idx +3]`.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.