public Task RunProcessAsync(Action callback) { return(Task.Run(() => { resizedImage = ResizeImage.MakeResizedImage(imageData, imageStride, endKey - startKey); RunProcess(); Image = GenerateImage(); if (!cancelled) { callback(); } })); }
private void ClusterisePalette_Click(object sender, RoutedEventArgs e) { if (chosenPalette == null || openedImagePixels == null) { return; } chosenPalette = Clusterisation.Clusterise( chosenPalette, ResizeImage.MakeResizedImage(openedImagePixels, openedImageWidth * 4, 128), 10); ReloadPalettePreview(); ReloadPreview(); }