Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation issue for -evaluate is missing some options #7998

Open
fmw42 opened this issue Feb 28, 2025 · 9 comments
Open

Documentation issue for -evaluate is missing some options #7998

fmw42 opened this issue Feb 28, 2025 · 9 comments

Comments

@fmw42
Copy link

fmw42 commented Feb 28, 2025

ImageMagick version

7.1.1.44

Operating system

MacOS

Operating system, version and so on

Ventura

Description

On the page at https://imagemagick.org/script/command-line-options.php#evaluate

the list of options is missing some compared to my running

magick -list evaluate

which gives me

Abs
Add
AddModulus
And
Cos
Cosine
Divide
Exp
Exponential
GaussianNoise
ImpulseNoise
InverseLog
LaplacianNoise
LeftShift
Log
Max
Mean
Median
Min
MultiplicativeNoise
Multiply
Or
PoissonNoise
Pow
RightShift
RMS
RootMeanSquare
Set
Sin
Sine
Subtract
Sum
Threshold
ThresholdBlack
ThresholdWhite
UniformNoise
Xor

This pertained to my use of -evaluate-sequence sum

Steps to Reproduce

see above

Images

None

@urban-warrior
Copy link
Member

We updated the operator list. Feel free to write up a description of any operator that is currently missing a description.

@fmw42
Copy link
Author

fmw42 commented Feb 28, 2025

Is there a difference between -evaluate-sequence sum and -evaluate-sequence add?

Is there a difference between -evaluate add X and -evaluate sum X?

@fmw42
Copy link
Author

fmw42 commented Feb 28, 2025

There are difference in the way -evaluate processed a single image and the way -evaluate-sequence processes multiple images. Should you not list all the relevant options in the section for -evaluate-sequence with relevant text for that?

Are all -evalute options relevant to -evaluate-sequence?

@snibgo
Copy link

snibgo commented Mar 2, 2025

Is there a difference between -evaluate-sequence sum and -evaluate-sequence add?

As far as I can see (from experiment and reading the code) there is no difference.

Is there a difference between -evaluate add X and -evaluate sum X?

As far as I can see (from experiment and reading the code) there is no difference.

Are all -evalute options relevant to -evaluate-sequence?

Yes.

There are difference in the way -evaluate processed a single image and the way -evaluate-sequence processes multiple images.

Can you give an example of a difference?

@fmw42
Copy link
Author

fmw42 commented Mar 2, 2025

Can you give an example of a difference?

add in -evaluate adds a value to an image

add in -evaluate-sequence adds two images

@snibgo
Copy link

snibgo commented Mar 3, 2025

Yes. That is the general pattern.

-evaluate {operation} value applies the operation and value to all the images in the current list. For example, -evaluate add 23% will add 23% of QuantumLevel to all channels of all pixels of all immages.

-evaluate-sequence {operation} applies the operation to the first two images, then to the result and the third image, then to the result and the fourth image, and so on. For example, -evaluate-sequence add will add the second image to the first, then add the third image, and so on. This is the same as simply adding all the images.

@fmw42
Copy link
Author

fmw42 commented Mar 3, 2025

Where did you find that documentation? I do not see it on the options page. -evaluate shows a list of options and explanation. But -evaluate-sequence does not. The options page needs a list of options with explanations relevant to it, since you see above that the meanings are different between -evaluate and -evaluate sequence. I am not sure what all the -evaluate options explanations are. Some are even missing.

@snibgo
Copy link

snibgo commented Mar 3, 2025

The above is from my knowledge, but see also https://usage.imagemagick.org/layers/#evaluate-sequence

I agree, the documentation at https://imagemagick.org/script/command-line-options.php#evaluate could be improved.

@fmw42
Copy link
Author

fmw42 commented Mar 3, 2025

Thanks. I did not know that was there. Nice to have that documentation. It is a start, but many more options exist and are not even explained there. I guess I will have to write some things up and change the options page, if I can figure out what the code does for the other options.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants