CyrusBuilt.MonoPi.Devices.PiCamera.StillCaptureSettings.ToArgumentString C# (CSharp) Method

ToArgumentString() public method

Converts this instance to a string of arguments that can be passed to raspistill.
public ToArgumentString ( ) : String
return String
		public String ToArgumentString() {
			String fname = String.Empty;
			if (this._output != null) {
				fname = Path.GetFileNameWithoutExtension(this._output.FullName);
			}

			String args = String.Empty;
			if (this._imageSize != Size.Empty) {
				args += " --width " + this._imageSize.Width.ToString();
				args += " --height " + this._imageSize.Height.ToString();
			}

			args += " --quality " + this._quality.ToString();
			if (this._timeout > 0) {
				args += " --timeout " + this._timeout.ToString();
			}

			if (this._timeLapse > 0) {
				args += " --timelapse " + this._timeLapse.ToString();
				fname += "_%04d";
			}

			fname += "." + CaptureUtils.GetEncodingFileExtension(this._encoding);
			fname = Path.Combine(this._output.Directory.FullName, fname);
			this._output = new FileInfo(fname);
			args += " --output " + this._output.FullName;

			if (this._verbose) {
				args += " --verbose";
			}

			args += " --encoding " + this._output.Extension;
			if (this._fullPreview) {
				args += " --fullpreview";
			}
			return args;
		}
		#endregion