From b6709dc836324d1ea6dcd90bd0257feb5d790e2f Mon Sep 17 00:00:00 2001 From: Rambalac Date: Thu, 6 Apr 2017 14:30:44 +0900 Subject: [PATCH] Fixing LUT --- GMaster/Views/CameraViewControl.xaml.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/GMaster/Views/CameraViewControl.xaml.cs b/GMaster/Views/CameraViewControl.xaml.cs index 33375bf..ffbd3ae 100644 --- a/GMaster/Views/CameraViewControl.xaml.cs +++ b/GMaster/Views/CameraViewControl.xaml.cs @@ -70,7 +70,7 @@ public void Dispose() private async void Camera_LiveViewUpdated(Stream stream) { stream.Position = 0; - liveViewBitmap = await CanvasBitmap.LoadAsync(LiveView, stream.AsRandomAccessStream()); + bitmap = await CanvasBitmap.LoadAsync(LiveView, stream.AsRandomAccessStream()); LiveView.Invalidate(); } @@ -163,7 +163,6 @@ private void LiveView_OnDraw(CanvasControl sender, CanvasDrawEventArgs args) ICanvasImage content = bitmap; if (lutEffect != null) { - content = lutEffect.GenerateEffect(content); } args.DrawingSession.DrawImage(content, imageRect, new Rect(0, 0, iW, iH), 1.0f, CanvasImageInterpolation.NearestNeighbor); @@ -217,6 +216,10 @@ private async Task CameraSet() { var lutName = Model.SelectedCamera.Settings.LutName; var lut = await Model.SelectedCamera.Model.LoadLut(lutName); + if (lut == null) + { + return; + } if (lut.BlueNum > 0) {