Page 1 of 1
Posted: 2006-11-15T20:51:25-07:00
by anthony
A faster function is to use -evaluate add 0.2
It is a set of apply constant to all images function that was added before the more generate -fx operator was created.
As for -fx speed, cristy has plans to 'compile' the -fx argument before applying it to each pixel/value, in the current image. this should imcrease its speed by several orders of magnitude for large images. When, is of course the question.
ASIDE: -fx currently does not use -region to limit its operations to a specific area.
Posted: 2006-11-17T01:38:26-07:00
by anthony
Not really, just a place holding in the IM Examples transformaton area, after the FX stuff.
http://www.cit.gu.edu.au/~anthony/graph ... /#evaluate
Basically like -fx values are cliped to a 0.0 to 1.0 range, but only a single contant operation can be applied.
However I do use it in a couple of places, such as in darkening the output from -shadow for generating fuzzy outlines...
http://www.cit.gu.edu.au/~anthony/graph ... ow_outline
Or in the generation of Gel Effects...
http://www.cit.gu.edu.au/~anthony/graph ... el_effects
Posted: 2006-11-17T10:22:36-07:00
by el_supremo
If I read the code correctly, the argument to the evaluate "add" operator should a be real decimal number with an optional percent sign after it.
will add 10 to each pixel whereas
will add ten percent of the quantume range to each pixel. Once a pixel reaches its maximum value (QuantumRange) it will not be changed any further.
The code uses the strtod C function to convert the input value, so it ought to be returning a zero if you specify a hex value such as 0x0780. I tested it with "0x20" and "0x2080" and neither of them changed the image.
Pete
Posted: 2006-11-19T18:39:44-07:00
by anthony
If what you say about percentages are true then the current code is wrong.
As I have not as yet explored the function, I couldn't say for certian.
However my understanding is that it works in the same way as -fx, whch normalizes all values to a 0.0..1.0 range, before and after the calculations. This is what it seems to do.
Anyone else with a view about this?