Support for two image output formats: jpeg and png