a few simple image processing methods