Added resolution for the toImage method