Example #1
0
 public void AddScannedPages(List<Bitmap> bitmaps)
 {
     foreach (Bitmap bitmap in bitmaps)
     {
         BitmapImage page = BitmapImageFromBitmap(bitmap);
         YellowstonePathology.Business.TifDocumentPage tifDocumentPage = new TifDocumentPage();
         tifDocumentPage.BitmapImage = page;
         this.m_Pages.Add(tifDocumentPage);
     }
 }
Example #2
0
 public void AddScannedPages(List <Bitmap> bitmaps)
 {
     foreach (Bitmap bitmap in bitmaps)
     {
         BitmapImage page = BitmapImageFromBitmap(bitmap);
         YellowstonePathology.Business.TifDocumentPage tifDocumentPage = new TifDocumentPage();
         tifDocumentPage.BitmapImage = page;
         this.m_Pages.Add(tifDocumentPage);
     }
 }
Example #3
0
 public void ConvertBitMapsToPages(List <Bitmap> bitmaps)
 {
     this.m_Pages.Clear();
     foreach (Bitmap bitmap in bitmaps)
     {
         BitmapImage     bitmapImage     = this.BitmapImageFromBitmap(bitmap);
         TifDocumentPage tifDocumentPage = new TifDocumentPage();
         tifDocumentPage.BitmapImage = bitmapImage;
         this.m_Pages.Add(tifDocumentPage);
     }
 }
Example #4
0
        private void SetPages()
        {
            System.IO.FileStream fileStream        = new FileStream(this.m_FileName, FileMode.Open, FileAccess.ReadWrite, FileShare.ReadWrite);
            TiffBitmapDecoder    tiffBitmapDecoder = new TiffBitmapDecoder(fileStream, BitmapCreateOptions.PreservePixelFormat, BitmapCacheOption.Default);

            for (int i = 0; i < tiffBitmapDecoder.Frames.Count; i++)
            {
                BitmapSource bitmapSource = tiffBitmapDecoder.Frames[i];
                YellowstonePathology.Business.TifDocumentPage tifDocumentPage = new TifDocumentPage();
                tifDocumentPage.BitmapImage = this.BitmapImageFromBitmapSource(bitmapSource);
                this.Pages.Add(tifDocumentPage);
            }
            fileStream.Close();
        }
Example #5
0
 public void ConvertBitMapsToPages(List<Bitmap> bitmaps)
 {
     this.m_Pages.Clear();
     foreach (Bitmap bitmap in bitmaps)
     {
         BitmapImage bitmapImage = this.BitmapImageFromBitmap(bitmap);
         TifDocumentPage tifDocumentPage = new TifDocumentPage();
         tifDocumentPage.BitmapImage = bitmapImage;
         this.m_Pages.Add(tifDocumentPage);
     }
 }
Example #6
0
 private void SetPages()
 {
     System.IO.FileStream fileStream = new FileStream(this.m_FileName, FileMode.Open, FileAccess.ReadWrite, FileShare.ReadWrite);
     TiffBitmapDecoder tiffBitmapDecoder = new TiffBitmapDecoder(fileStream, BitmapCreateOptions.PreservePixelFormat, BitmapCacheOption.Default);
     for (int i = 0; i < tiffBitmapDecoder.Frames.Count; i++)
     {
         BitmapSource bitmapSource = tiffBitmapDecoder.Frames[i];
         YellowstonePathology.Business.TifDocumentPage tifDocumentPage = new TifDocumentPage();
         tifDocumentPage.BitmapImage = this.BitmapImageFromBitmapSource(bitmapSource);
         this.Pages.Add(tifDocumentPage);
     }
     fileStream.Close();
 }