added in support for rotating images