Esempio n. 1
0
        public Bitmap Render(ScannedImage image)
        {
            var bitmap = image.FileFormat == null
                ? pdfRenderer.Render(image.RecoveryFilePath).Single()
                : new Bitmap(image.RecoveryFilePath);

            lock (image.RecoveryIndexImage.TransformList)
            {
                return(Transform.PerformAll(bitmap, image.RecoveryIndexImage.TransformList));
            }
        }
Esempio n. 2
0
 public async Task <Bitmap> Render(ScannedImage.Snapshot snapshot, int outputSize = 0)
 {
     return(await Task.Factory.StartNew(() =>
     {
         var bitmap = snapshot.Source.FileFormat == null
             ? pdfRenderer.Render(snapshot.Source.RecoveryFilePath).Single()
             : new Bitmap(snapshot.Source.RecoveryFilePath);
         if (outputSize > 0)
         {
             bitmap = ShrinkBitmap(bitmap, outputSize);
         }
         return Transform.PerformAll(bitmap, snapshot.TransformList);
     }));
 }