TIFF to JPEG conversion with strange behavior
See original GitHub issueI 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)
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:5
Top Results From Across the Web
changing TIFF to JPEG - Microsoft Community
Open the file that you would like to convert using Microsoft Paint. Go to the File menu. Select Save As and click on...
Read more >TIFF to JPEG with Automator - Apple Support Communities
I am doing a large scanning project and using Automator to convert TIFF to JPG. I find that it generally works well, but...
Read more >How to convert TIFF to JPG | Adobe
Make your TIFF images into JPGs. 1. Choose File and select Save As. Or, choose File, then Export, and Save for Web (Legacy)....
Read more >Visualization problem with TIF in Cytomine - Usage & Issues
This way, we convert any image format to an anonymous TIF file. ... “/path/to/file.tiff”[tile=true,compression=jpeg,pyramid=true].
Read more >RAW to Tiff color profile conversion Issue? - Capture One
In both cases I'm seeing something quite strange - the exported tiff (16bit) images do not resemble what I processed in either tool....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Sweet! This problem might be a little out of my depth (bdum bdum tsk). Feel free to make a PR if you solve the issue. As i said though this is most likely a problem in a dependency of ours
Is there any progress on this ?