Comments (6)
For the curves() function, you have to specify 4 arguments: a start point, 1st control point, 2nd control point, and end point.
Not sure what you mean by "adjusting the value of the colors," could you elaborate a bit?
from camanjs.
For the curves() function, you have to specify 4 arguments: a start point, 1st control point, 2nd control point, and end point.
Not sure what you mean by "adjusting the value of the colors," could you elaborate a bit?
Basically I'm trying to port a color filter from a GIMP plugin.
The original code looks like this:
(gimp-curves-spline draw HISTOGRAM-VALUE 8 #(0 0 68 64 190 219 255 255))
(gimp-curves-spline draw HISTOGRAM-RED 8 #(0 0 39 93 193 147 255 255))
(gimp-curves-spline draw HISTOGRAM-GREEN 6 #(0 0 68 70 255 207))
(gimp-curves-spline draw HISTOGRAM-BLUE 6 #(0 0 94 94 255 199))
Apparently value maps to overall brightness. As you can see some of those channels have just three pairs of control points. Any idea how to work around these issues?
Thanks for the prompt feedback by the way. :)
from camanjs.
Hmm... I may be wrong, but at first look I think the same effect can be achieved if the middle two control points have the same coordinate.
Caman("#image", function () {
this.curves('g', [0, 0], [68, 70], [68, 70], [255, 207]);
this.render();
});
This is something that can be built into the curves() function in the future by checking for the # of arguments.
from camanjs.
Hmm... I may be wrong, but at first look I think the same effect can be achieved if the middle two control points have the same coordinate.
Oh, right. That's definitely true.
This is something that can be built into the curves() function in the future by checking for the # of arguments.
Cool. I'll write a patch for you that does that.
Any idea how to deal with that value bit? I can probably live without that, though.
from camanjs.
Not too sure... I would need to either see examples of what it's doing or play around with it myself in GIMP.
from camanjs.
Not too sure... I would need to either see examples of what it's doing or play around with it myself in GIMP.
Ok. No probs. If I figure that out, I'll contribute a patch.
Going to close this issue given we managed to sort the issue out. Now to get that patch underway. :)
from camanjs.
Related Issues (20)
- Raw image size is much bigger than the original size when toBase64() is used HOT 1
- Sharpen filter adds transparancy lines HOT 4
- Preset Filters output Error
- newLayer + overlayImage HOT 1
- A BUG
- Replacing image HOT 2
- Cannot install CamanJS with npm HOT 8
- How to achieve luminosity blend mode, and other questions
- replacing canvas data with new data.
- Caman is throwing fatal error
- Opacity Filter for image is not there. HOT 1
- camanjs returns maximum callstack error on cropping source
- NodeJS Canvas is not a constructor HOT 11
- not_support_camera
- this.sharpen is not a function HOT 1
- Caman.js render applies to previous state instead of current state of canvas HOT 1
- I meet this problem: HOT 1
- Eraser feature
- new feature
- [Question] Is there a binary threshold function similar to that of OpenCV's
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from camanjs.