LoginSignup
1
0

More than 5 years have passed since last update.

【Xamarin.Forms】AVFoundationを使ってiOSカメラアプリ開発 ズーム/明るさ設定編

Last updated at Posted at 2019-01-05

AVFoudationでカメラのズーム値を変更

ズーム値は1~100倍近くまで設定することができます(iPad Airの場合)

    public static AVCaptureDevice device;
    private float BrightnessValue = 1.0f;
    device.LockForConfiguration(out NSError error);
    device.SetExposureTargetBias(BrightnessValue, null);
    device.UnlockForConfiguration();

AVFoudationでカメラの明るさ(露出度)を変更

明るさは-8~+8で設定できます(同じくiPad Air)

    private float ZoomValue = 1.0f
    device.LockForConfiguration(out NSError error);
    device.VideoZoomFactor = ZoomValue;
    device.UnlockForConfiguration();

カスタムレンダラーと組み合わせる事によってスライダーコントロールやボタンコントロールで動的に変更することもできます。

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0