added multiple format detection jpeg and png