Skip to content

GetVMR9ImageAdjustmentBounds

function

Delphi
function GetVMR9ImageAdjustmentBounds (MainDisplay: Boolean; VMR9ControlSetting: TVMR9ImageAdjustment; out MinValue: LongInt; out MaxValue: LongInt; out StepSize: LongInt; out DefaultValue: LongInt; out CurrentValue: LongInt): Boolean;
C++Builder
bool __fastcall GetVMR9ImageAdjustmentBounds(bool MainDisplay, TVMR9ImageAdjustment VMR9ControlSetting, /* out */ System::LongInt &MinValue, /* out */ System::LongInt &MaxValue, /* out */ System::LongInt &StepSize, /* out */ System::LongInt &DefaultValue, /* out */ System::LongInt &CurrentValue);
C#
public bool GetVMR9ImageAdjustmentBounds(bool MainDisplay, TVMR9ImageAdjustment VMR9ControlSetting, out int MinValue, out int MaxValue, out int StepSize, out int DefaultValue, out int CurrentValue);
VB.NET
Public Function GetVMR9ImageAdjustmentBounds(MainDisplay As Boolean, VMR9ControlSetting As TVMR9ImageAdjustment, ByRef MinValue As Integer, ByRef MaxValue As Integer, ByRef StepSize As Integer, ByRef DefaultValue As Integer, ByRef CurrentValue As Integer) As Boolean
C++/Qt
BOOL GetVMR9ImageAdjustmentBounds (BOOL MainDisplay, TVMR9ImageAdjustment VMR9ControlSetting, int *MinValue, int *MaxValue, int *StepSize, int *DefaultValue, int *CurrentValue);

Retrieves the bounds of the specified VMR9 image adjustment property (brightness, contrast, hue, saturation, alpha). The VMR9ControlSetting parameter is of the TVMR9ImageAdjustment type.

Returns all the information useful to set up a trackbar component (min value, max value, step size, default value, current position), e.g.:

procedure TForm1.VideoGrabberGraphBuilt(Sender: TObject);
var
  MinValue, MaxValue, StepSize, DefaultValue, CurrentValue: LongInt;
begin
  BrightnessTrackbar.Enabled := VideoGrabber.GetVMR9ImageAdjustmentBounds (True, vmr9_Brightness, MinValue, MaxValue, StepSize, DefaultValue, CurrentValue);
  if BrightnessTrackbar.Enabled then begin
    BrightnessTrackbar.Min := MinValue;
    BrightnessTrackbar.Max := MaxValue;
    BrightnessTrackbar.Frequency := StepSize;
    BrightnessTrackbar.Position := CurrentValue;
  end;
end;

procedure TForm1.BrightnessTrackbarChange(Sender: TObject);
begin
  VideoGrabber.SetVMR9ImageAdjustmentValue (True, vmr9_Brightness, BrightnessTrackbar.Position, false);
end;

See the MainDemo project for more sample code.