question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

TIFF to JPEG conversion with strange behavior

See original GitHub issue

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: 1

Expected Behavior

It should look like this, just with an white background. 3

Current Behavior

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

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:open
  • Created 5 years ago
  • Reactions:1
  • Comments:5

github_iconTop GitHub Comments

1reaction
hipstersmoothiecommented, Nov 28, 2018

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

0reactions
nikunjdreamorbitcommented, Dec 7, 2021

Is there any progress on this ?

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found