Added support for fliping images