Added some image manipulation utilities