added jpeg compression option