TIFF to JPEG conversion with strange behavior
- Dominant language
- TypeScript
- Stars
- 14.7k
- Forks
- 777
- PR merge metrics
- No merged PRs in 30d
Description
I am trying to generate a thumbnail of a TIFF, in JPEG, and render it using base64.
But the thing is, in some files I got this strange result below.
Original image looks like this, with transparent background:

# Expected Behavior
It should look like this, just with an white background.

# Current Behavior
It looks like it lost its color, it is repeated and some other stuff, as you can see.

# Failure Information (for bugs)
This conversion has been tried on other tiff images, with different compression types and different settings for saving transparent pixels. In some of them everything goes fine, on other ones this strange result is given.
## Steps to Reproduce
This is the code that is being used for generating this conversion:
```
Jimp
.read(imagePath)
.then(image => {
image
.resize(Jimp.AUTO, 350)
.background(0xFFFFFFFF)
.getBase64Async(Jimp.MIME_JPEG)
.then(base64Image => document.getElementById('image').src = base64Image
.catch(err => ...)
})
.catch(err => ...)
```
## Context
- Jimp Version: 0.5.6
- Operating System: Debian 9, Windows 10
- Node version: running on Electron (node 10.2)
Contributor guide
Assessment
This issue has not been assessed yet.