Page 1 of 1

Re: Magick++ documenation

Posted: 2008-07-01T18:28:43-07:00
by magick
We will patch the Magick++ documentation with your suggestions in the next day or two. Thanks.

Re: Magick++ documenation

Posted: 2008-07-01T19:09:08-07:00
by fmw42
On the other hand, the documentation for command line IM appears correct at http://www.imagemagick.org/script/comma ... p#modulate
-modulate value

vary the brightness, saturation, and hue of an image.

Specify the percent change in brightness, the color saturation, and the hue separated by commas. Hue is the percentage of absolute rotation from the current position. For example 50 results in a counter-clockwise rotation of 90 degrees, 150 results in a clockwise rotation of 90 degrees, with 0 and 200 both resulting in a rotation of 180 degrees. .

To increase the color brightness by 20% and decrease the color saturation by 10% and leave the hue unchanged, use: -modulate 120,90.

Re: Magick++ documenation

Posted: 2008-07-02T16:59:16-07:00
by anthony
I have started a new topic, about the -modulate operator.
viewtopic.php?f=2&t=11608

In my oppion it is very very broken, and should be fixed NOW, as part of the
re-development of 'Color Modifications' page of IM Examples (along with -level and -gamma, plus the new operators +level and +/-level-colors

Re: Magick++ documenation

Posted: 2008-07-04T01:23:03-07:00
by Lithium
I've been studying -fx operator and found out that its speed strongly depends on identifiers length. More specifically, if you use variable names with length greater than 2 letters, -fx becomes very slow. If you limit your variable names to 2 characters, it works fast.

For example,

Code: Select all

imconvert rose: -fx "te = 0; 0" r.bmp
works ten times faster than

Code: Select all

imconvert rose: -fx "test = 0; 0" r.bmp
This is, obviously, because color name lookup algorithm takes long time when given not a color name, and it is called,

Code: Select all

  if ((strlen(p) > 2) &&
.

I hope it is correct topic to post, because it concerns documentation: could you, please, state this behavior in the docs and examples?
Now it says:
Also as a lot of single letters are used for internal variables accessing image information, it is recomended that variable names be at least two letters long
ImageMagick-6.4.1 Q16 Windows

Re: Magick++ documenation

Posted: 2008-07-04T17:40:13-07:00
by anthony
What this basically means is that -fx needs a proper parser, and perhaps a byte code compiler. Then again many other parts of IM also needs something like this too.

It is something what should be done as part of a IM v7 development.

Re: Magick++ documenation

Posted: 2008-07-05T07:21:38-07:00
by Lithium
I'm sorry, but my point is somewhat different- I know about -fx problems and perspectives, and it is obviously that this cannot be easily fixed, but it seems to me that that small note in documentation would help ppl right now to avoid that pitfall . After all, there can be 10 times difference of elapsed time.

Re: Magick++ documenation

Posted: 2008-07-06T17:23:48-07:00
by anthony
I have added the following to the 'FX' section of IM examples...
It is recommended that you only use short two letter variable names only. Longer names has been shown to slow the FX interpretor (which is already slow) by order of magnitude. Single letter variables are not recomended as these are reserved for image references.

Re: Magick++ documenation

Posted: 2008-07-06T17:39:56-07:00
by magick
The slowdown associated with variables names > 2 characters is fixed in the release scheduled for tomorrow, 6.4.2-2.

Re: Magick++ documenation

Posted: 2008-07-10T11:01:56-07:00
by Lithium
Thanks!

Re: Magick++ documenation

Posted: 2008-07-10T12:03:55-07:00
by magick
ImageMagick 6.4.2-2 is still in Beta and is available here: ftp://magick.imagemagick.org/pub/ImageMagick/beta. A release is scheduled within the next two weeks.