Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mask color array #65

Closed
wants to merge 3 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,16 +130,18 @@ Unlisted groups MAY be masks.

### "color"

The `color` key defines an image that is "labeled", i.e. every unique value in the image
The `color` key defines an integer image that is "labeled", i.e. every unique non-negative value in the image
represents a unique, non-overlapping object within the image. The value associated with
the `color` key is another JSON object in which the key is the pixel value of the image and
the value is an RGBA color (4 byte, `0-255` per channel) for representing the object:
the `color` key is a JSON array in which the index is the pixel value of the image and
the value is an RGBA color (4 byte, `0-255` per channel) for representing the object, or `null` if no color is set:
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should say something about how the 4-bytes are converted to a single int, e.g. signed/unsigned, big/little endian


```
{
"color": {
"1": 8388736,
"color": [
null,
8388736,
...
]
```
### "image"

Expand Down