add jpeg write to stream