premultiplied Usage: When compress png with premulitiplied, then output png shows bad.
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 32.7k
- Forks
- 1.4k
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 5
Description
## Possible bug
```
// Copyright 2013 Lovell Fuller and others.
// SPDX-License-Identifier: Apache-2.0
'use strict';
const sharp = require('sharp');
sharp('PariteShip.png',{ premultiplied: true })
.png({ quality: 80},{ premultiplied: true })
.toFile('compressed.png',{ premultiplied: true })
```
### What is the expected behaviour?

If I delete the compress code, then output png shows good.
below is the correct result

Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the JavaScript reproduction in the issue, using the provided PariteShip.png input and comparing compressed.png with the expected images. Investigate how premultiplied is passed to sharp's input, PNG output, and toFile operations; done means compression preserves the expected image without the reported artifact.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, nodejs
- Domain
- computer-vision
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100