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.

Sepia and Invert Effects work but why not the rest?

See original GitHub issue

Hi, I’m developing an Image Gen API website and making effects endpoints such as Grayscale, Sepia, Silhouette etc.

I could be wrong here but for some reason, only my Sepia and Invert endpoints are working, when trying to require grayscale, blur, brightness, darkness and the rest. They either result in a black or white generated image. See screenshots and code for what I mean.

Removed links to avoid people copying code since issue was fixed - sorry for the Grayscale code. for Sepia code. Screenshots: https://imgur.com/a/PIxvdls

Using 3.1.0 as the version.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:11 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
kyranetcommented, Apr 3, 2020

Have you tried more images in threshold? If almost the entire surface of the image is pastel, threshold simply cannot work due to how its formula works.

For example threshold has 2 arguments, canvas and threshold, where you’d normally do threshold(canvas, 140) in a functional way, you’d do .process(threshold, 140) instead.

0reactions
NTMNathancommented, Apr 3, 2020

I did a test, please see the post in #342

Read more comments on GitHub >

github_iconTop Results From Across the Web

Sepia filter inverting - python - Stack Overflow
An interesting question. The answer may be a little disappointing: a sepia filter is not reversible in theory, or in practice. Theory.
Read more >
CSS3 filter effects: Grayscale, invert, sepia, and more
The invert filter effect reverses the hue, saturation, and brightness values of the content of the object and is expressed as a percentage....
Read more >
How to Create the Invert Effect in Adobe Premiere Pro
The Invert effect is a simple way to make changes in your footage. This is particularly useful if you want to change the...
Read more >
Half Sepia - Photoshop Tutorials
In this tutorial, you'll learn how to add a sepia tone ... Check and uncheck the Invert checkbox to find the effect you...
Read more >
filter - CSS: Cascading Style Sheets - MDN Web Docs - Mozilla
The filter CSS property applies graphical effects like blur or color shift to an element. Filters are commonly used to adjust the rendering ......
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