Mikolaj Machowski on  wrote...
| Anthony Thyssen scripsit:
| > Mikolaj Machowski on  wrote...
| >| Hello,
| >| 
| >| How to simulate Curves tool from GUI programs?
| >| 
| >| I suppose there is some smart meddling with fx option but I would be
| >| grateful for any hints.
| >| 
| > Yes and with the help of an external script (which uses gnuplot
| > underneath),
| >     http://www.imagemagick.org/Usage/scripts/im_fx_curves
| 
| Thanks but something doesn't work. I tried to use it as explained to get
| line going through 10,0 and 90,100 points but in with -d option I get
| line going through 0,50 and 50,100 with output: 1,000*u+0,000
| 
Have a look at the code, (awk section) do you have 
   sprintf("%.3f", $3)
or
   sprintf("%.3g", $3)

the problem is that the print number method eith prints far too many
digits, adds a 'E' scientific notation, or commas. The first is a waste
of unneeded precision, while the last two number styles is not stood by IM.
(interfers with other syntaxtic requirements).

---

If anyone likes to try to solve this problem so the you can still get
simple formulas like

    3.5*u^3 - 5.05*u^2 + 2.05*u + 0.3

without the current extra precision (which slows the IM interpreter)
such as what is currently being output

    im_fx_curves -p   0,30   100,80   50,50   80,50
    3.500*u^3-5.050*u^2+2.050*u+0.300

Will be most welcome.



| > The closest would be a curved contrast adjustment known as
| > -sigmodial-contrast.
| 
| Somewhere is typo: in my docs distributed with IM 6.3.0-3 in docs is
| option called "sigmoidal-contrast". Also this whole trick is to *avoid*
| contrast change. As explained in tutorial operating on HSB changes
| contrast, but in L*a*b* it doesn't happen.
| 
Sorry I am always making the typo.

But the curves result in the example you gave is a simple linear
contrast change :-)

Currently even the IM -levels will not let you do that due to limit
checks on the precentages (0-100% limits).



  Anthony Thyssen ( System Programmer )    <[EMAIL PROTECTED]>
 -----------------------------------------------------------------------------
  "Now I've got the bead on you with MY disintegrating gun.
   And when it disintegrates, it disintegrates. (pulls trigger)
   Well, what you do know, it (the gun) disintegrated."
                 -- Daffy Duck -- Duck Dodgers in the 24th and a half century
 -----------------------------------------------------------------------------
     Anthony's Home is his Castle     http://www.cit.gu.edu.au/~anthony/
_______________________________________________
Magick-users mailing list
[email protected]
http://studio.imagemagick.org/mailman/listinfo/magick-users

Reply via email to