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.

Setting Background Color of Image not working

See original GitHub issue

Expected Behavior

Color the Image Background to specified color

Current Behavior

Image Background doesn’t change color

Failure Information (for bugs)

No Error

Steps to Reproduce

  1. Read Image
  2. Set Background color
  3. Write to File
        return Jimp.read('app/background.png')
        .then(image => {
            image.background(0x0012faff);
        })
        .then(image => {
            return image.writeAsync(`app/new-${(new Date()/1000)}.png`);
        })

Context

  • Jimp Version: 0.6.0
  • Operating System: Mac Mojave
  • Node version: 7.0.0

Failure Logs

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:1
  • Comments:7

github_iconTop GitHub Comments

2reactions
niko-la-petroviccommented, Sep 17, 2021

Noticed the same issue here.

2reactions
cruzachcommented, Aug 27, 2020

I know it’s been a while here, but I’m also running into this issue. Have an image with a transparent background and calling .background() doesn’t seem to change anything

Read more comments on GitHub >

github_iconTop Results From Across the Web

CSS: background image on background color - Stack Overflow
This work fine so far. The problem is now that I can't display the small sign and make the panel blue at the...
Read more >
How to fix CSS background-image not working | HTML/CSS
1. Check that your CSS file is linked correctly in your HTML file. · 2. Make sure the image path is set correctly...
Read more >
background-color - CSS: Cascading Style Sheets | MDN
The background-color CSS property sets the background color of an element.
Read more >
Changing your Virtual Background image - Zoom Support
If you are experiencing issues with Virtual Background, try the following troubleshooting tips: ... Manually pick the background color to ensure ...
Read more >
Background images with HTML & CSS - YouTube
In this video, I look at how to set a background image, problems people run into with them and how to fix them,...
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