Beispiel #1
0
        private void OnTileCorrelated(CorrelationTile tile, Rectangle bounds, FreeImageAlgorithmsBitmap fib, bool success)
        {
            this.tiledImageViewer.AddTile(bounds, fib);

            this.tiledImageViewer.Refresh();

            #if DEBUG
            if (success == false)
            {
                FreeImageAlgorithmsBitmap bg = new FreeImageAlgorithmsBitmap(this.correlator.BackgroundImage);
                bg.ConvertTo24Bits();
                bg.DrawColourRect(tile.OriginalBoundsRelativeToOrigin, Color.Red, 2);
                this.debugForm.BackgroundImageView.Image = bg.ToBitmap();
                bg.Dispose();
            }

            this.debugForm.Refresh();
            #endif
        }
Beispiel #2
0
        private void OnTileCorrelationBegin(CorrelationTile tile, FreeImageAlgorithmsBitmap fib)
        {
            this.useCorrelationCheckBox.Checked = false;
            this.currentTile = tile;

            #if DEBUG

            FreeImageAlgorithmsBitmap fg = new FreeImageAlgorithmsBitmap(fib);

            fg.ConvertToStandardType(true);
            fg.ConvertTo24Bits();

            this.debugForm.TileImageView.Image = fg.ToBitmap();

            this.debugForm.BackgroundImageView.Refresh();
            this.debugForm.TileImageView.Refresh();

            fg.Dispose();

            #endif
        }
Beispiel #3
0
        private void SaveScreenShot()
        {
            string filePath = Utilities.SaveDialog(true);

            if (filePath == null)
                return;

            Bitmap bitmap = this.imageView.ScreenBitmap;
            Graphics g = Graphics.FromImage(bitmap);

            g.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.HighQualityBilinear;

            OnSavingScreenShot(g, new MosaicWindowEventArgs(MosaicWindow.MosaicInfo));

            FreeImageAlgorithmsBitmap fib = new FreeImageAlgorithmsBitmap(bitmap);

            fib.ConvertTo24Bits();

            g.Dispose();

            bitmap.Dispose();

            string extension = Path.GetExtension(filePath);

            if (extension != ".ics")
            {
                fib.SaveToFile(filePath);
            }
            else {
                IcsFile.SaveToFile(fib, filePath, true);
            }

            fib.Dispose();
        }