I have a directary full of 2 bit gif images. I would like to crop these images to their smallest extents. The best way I could come up with was to itterate through each pixel and store the max and min for x and y and then crop based on those values. This seems a bit clunky, is there a better way?