示例#1
0
        private void ResetUpdateControls()
        {
            ResetControls();

            if (rawImage == null || isBindingEnabled == false) return;

            var old = new ImageEffect();
            old.Copy(EditionValue);
            History.Add(new HistoryObject(EffectType.Reset, EditionValue.GetCopy()) { oldValue = old });
            UpdatePreview(true);
        }
示例#2
0
 private async void ShowBeforeDisplayAsync()
 {
     //if first time create the image
     if (ImageBoxPlain.Source == null || rotation != EditionValue.Rotation)
     {
         var edit = DefaultValue.GetCopy();
         rotation = edit.Rotation = EditionValue.Rotation;
         SoftwareBitmap image = await Task.Run(() =>
         {
             return ApplyImageEffect8bitsNoHistoAsync(rawImage.preview, edit);
         });
         WriteableBitmap bitmap = new WriteableBitmap(image.PixelWidth, image.PixelHeight);
         image.CopyToBuffer(bitmap.PixelBuffer);
         ImageBoxPlain.Source = bitmap;
         image.Dispose();
     }
     //toggle visibility
     ImageBoxPlain.Visibility = Visibility.Visible;
 }