// This macro finds the location of the lower right most pixel // with the value max, where max is the highest pixel value // in the image. showStatus("Finging pixel with largest value..."); max = 0; width = getWidth(); height = getHeight(); for (y=0; ymax) { max = value; xmax = x; ymax = y; } } } print("A pixel with the max value ("+max+") is located at "+xmax+","+ymax);