Gets the preview size from the target size.
the preview size
the target size
the output target class. Only used for CameraSource.