How to get min and max value of a greyscale texture?

If I have a greyscale texture/alpha/mask is there any function that will return the maximum and minimum values that are contained within that texture? In other words the value ‘range’ of that texture?

If it is material you are speaking about, then the answer will most likely be no.

Darn. I figured as much. Thanks anyways!