Example #1
0
        private void SetJitterC(object obj)
        {
            Bitmap bmp = null;

            try
            {
                bmp = (Bitmap)Images.Instance.CurrentBitmap.Clone();
            }
            catch { }
            Bitmap bmpselected = null;

            try
            {
                bmpselected = (Bitmap)Images.Instance.SelectedBitmap.Clone();
            }
            catch { }
            if (partarea == true && bmpselected != null)
            {
                jitterFilter.ApplyInPlace(bmpselected);
                Graphics newImage = Graphics.FromImage(bmp);
                newImage.DrawImage(bmpselected, (int)SelectedPoints.selectPointForEfX, (int)SelectedPoints.selectPointForEfY, bmpselected.Width, bmpselected.Height);
            }
            else if (bmp != null)
            {
                jitterFilter.ApplyInPlace(bmp);
            }
            Images.Instance.CurrentBitmap = bmp;
            Images.Instance.NotifyImages();
            this.Temporary = bmp;
        }
Example #2
0
        private void Jitter_Filter_Process()
        {
            var filter = new Jitter(4);

            AddLog("filtr Jitter na " + _view.CurrentFile);
            filter.ApplyInPlace(_image);
            Thread.Sleep(200);
        }
Example #3
0
        private void Jitter_Filter_Process(object callback)
        {
            var filter = new Jitter(4);

            AddLog("filtr Jitter na " + _view.CurrentFile);
            filter.ApplyInPlace(_image);
            Thread.Sleep(200);
            ((AutoResetEvent)callback).Set();
        }
Example #4
0
        public static Bitmap Jitter(Bitmap bmp, int value)
        {
            // create filter
            Jitter filter = new Jitter(value);

            // apply the filter
            filter.ApplyInPlace(bmp);
            return(bmp);
        }