Exemplo n.º 1
0
 private Image FetchCroppedImage(BackgroundWorker progressReporter, CropTiler tiler)
 {
     try
     {
         return tiler.ConstructTiledImage(progressReporter);
     }
     catch (Exception ex)
     {
         Console.WriteLine("" + ex);
         if (this.ErrorReplacementImage != null)
         {
             return new Bitmap(ErrorReplacementImage, ErrorReplacementImage.Width / 2, ErrorReplacementImage.Height / 2);
         }
         else
             throw new Exception("Previous image was null.", ex);
     }
 }
Exemplo n.º 2
0
 public void SetUp()
 {
     tiler = new CropTiler();
     tiler.ImageFetchFunction = Tiler_Test.FetchFunction;
 }