utilities for working with images in haskell