Exemplo n.º 1
0
 public Task RunProcessAsync(Action callback)
 {
     return(Task.Run(() =>
     {
         resizedImage = ResizeImage.MakeResizedImage(imageData, imageStride, endKey - startKey);
         RunProcess();
         Image = GenerateImage();
         if (!cancelled)
         {
             callback();
         }
     }));
 }
Exemplo n.º 2
0
 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();
 }