Added a windowing function to image class.