Implementation of some image processing methods.