Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
The %[fx:mean] only returning red channel mean seems to me to be a bug.
The %[fx:....] was specifically designed to only do a single calculation on an image, returning the equivalent results of -fx with limitations of i=0, j=0 and for red channel output. This calculation pre-dated the addition of fx 'mean', and as such 'mean' caclulation may be adversely effected by the %[fx] environment.
However 'mean' is not channel specific. It probably should always return the same value as %[mean], unless a sub-channel request is made (if that is posible) %[fx:mean.r]
As such I would say only returning red channel is a bug. But the fact that it is unchanging is NOT a bug.
Are you sure %[fx:mean] value is just red channel? Could it actually be whole image mean?
ASIDE: I would also hope that in a normal -fx the value of 'mean' is cached on first lookup, and not re-calculated every time. Otherwise the slow fx would get very very much slower still.
Same goes for some of the
anthony wrote:
Are you sure %[fx:mean] value is just red channel? Could it actually be whole image mean?
I learned long ago to never be sure of anything. Maybe I can't convert between Q16, Q8, and % correctly, and I am certainly no ImageMagick wizard. In my second post I provided my 4 commands and 16 outputted numbers. If it helps, Photoshop gives me the following for RGB means: 143.98, 142.75, 134.91. It would be nice if someone else could look at those numbers and interpret what they see. If they concur that I am using the commands and interpreting the numbers correctly, I or they can try to reproduce this on a smaller image.