Example #1
0
        static void Main(string[] args)
        {
            var imagen360 = new Bitmap360(@"C:\Users\Euler\Pictures\SAM_100_0033.jpg");
            var imagenWm  = new WatermarkBitmap(@"C:\Users\Euler\Pictures\ESIME.png");

            Watermarking wm = new Watermarking(imagen360, imagenWm, new Factores(),
                                               //TissotIndicatrix.TopIndicatrix,
                                               //TissotIndicatrix.BottomIndicatrix,
                                               TissotIndicatrix.FirstIndicatrix,
                                               TissotIndicatrix.SecondIndicatrix,
                                               TissotIndicatrix.ThirdIndicatrix,
                                               TissotIndicatrix.FourthIndicatrix
                                               //TissotIndicatrix.FifthIndicatrix,
                                               //TissotIndicatrix.SixthIndicatrix,
                                               //TissotIndicatrix.SeventhIndicatrix,
                                               //TissotIndicatrix.EighthIndicatrix,
                                               //TissotIndicatrix.NinthIndicatrix,
                                               //TissotIndicatrix.TenthIndicatrix,
                                               //TissotIndicatrix.EleventhIndicatrix,
                                               //TissotIndicatrix.TwelfthIndicatrix
                                               );

            wm.Prepare();

            wm.Apply().Save(@"C:\Users\Euler\Pictures\ImagenMarcada10.jpg", ImageFormat.Jpeg);

            Console.ReadKey();
        }
Example #2
0
        private async void InsertWatermark()
        {
            if (_Image360 == null || _Watermark == null)
            {
                await DialogManager.ShowMessageAsync(_metroWindow, "Advertencia", "Se requiere de la imagen 360° y de la marca de agua para poder realizar este proceso.", settings : new MetroDialogSettings()
                {
                    ColorScheme = MetroDialogColorScheme.Accented
                });

                return;
            }

            var controller = await _metroWindow.ShowProgressAsync("Por favor espere", "Se está aplicando la marca de agua.", settings : new MetroDialogSettings()
            {
                ColorScheme = MetroDialogColorScheme.Accented
            });

            controller.SetIndeterminate();

            await Task.Factory.StartNew(() => {
                Watermarking proceso = new Watermarking(_Image360, _Watermark, new Factores(Factor),
                                                        TissotIndicatrix.TopIndicatrix,
                                                        TissotIndicatrix.BottomIndicatrix,
                                                        TissotIndicatrix.FirstIndicatrix,
                                                        TissotIndicatrix.SecondIndicatrix,
                                                        TissotIndicatrix.ThirdIndicatrix,
                                                        TissotIndicatrix.FourthIndicatrix,
                                                        TissotIndicatrix.FifthIndicatrix,
                                                        TissotIndicatrix.SixthIndicatrix,
                                                        TissotIndicatrix.SeventhIndicatrix,
                                                        TissotIndicatrix.EighthIndicatrix,
                                                        TissotIndicatrix.NinthIndicatrix,
                                                        TissotIndicatrix.TenthIndicatrix,
                                                        TissotIndicatrix.EleventhIndicatrix,
                                                        TissotIndicatrix.TwelfthIndicatrix
                                                        );

                proceso.Prepare();

                _Result = proceso.Apply();
            });

            await controller.CloseAsync();

            // Se guarda y se visuliza
            GuardarImagen();
        }