public void Contrast() { new Thread(() => { this.undoRedo.PushToUndoStack((Bitmap)this.model.Image.Clone()); this.undoRedo.ClearRedoStack(); BasicFilters.Contrast(this.model.Image, (sbyte)this.filterParam); this.view.RedrawInvoker(); }).Start(); }
public void Brightness() { new Thread(() => { this.undoRedo.PushToUndoStack((Bitmap)this.model.Image.Clone()); this.undoRedo.ClearRedoStack(); BasicFilters.Brightness(this.model.Image, (int)this.filterParam); this.view.RedrawInvoker(); }).Start(); }
public SeamCarving(Bitmap b) { this.edge = (Bitmap)b.Clone(); this.m_bitmap = (Bitmap)b.Clone(); //SimpleFilters.GrayscaleMarshaling(this.edge); //SimpleFilters.EdgeDetectHorizontalUnsafe(this.edge); this.energyMap = new int[this.m_bitmap.Height, this.m_bitmap.Width]; this.bitmapMatrix = new Pixel24b[this.m_bitmap.Height, this.m_bitmap.Width]; BasicFilters.GrayscaleMarshal(this.edge); ConvFilters.EdgeDetectConvolution(this.edge, 1, 0); }
public void Gamma(double r, double g, double b) { this.undoRedo.PushToUndoStack((Bitmap)this.model.Image.Clone()); this.undoRedo.ClearRedoStack(); new Thread(() => { this.undoRedo.PushToUndoStack((Bitmap)this.model.Image.Clone()); this.undoRedo.ClearRedoStack(); BasicFilters.Gamma(this.model.Image, r, g, b); this.view.RedrawInvoker(); }).Start(); }
public void Color(int r, int g, int b) { this.undoRedo.PushToUndoStack((Bitmap)this.model.Image.Clone()); this.undoRedo.ClearRedoStack(); new Thread(() => { this.undoRedo.PushToUndoStack((Bitmap)this.model.Image.Clone()); this.undoRedo.ClearRedoStack(); BasicFilters.Color(this.model.Image, r, g, b); this.view.RedrawInvoker(); }).Start(); }
public void Grayscale() { this.undoRedo.PushToUndoStack((Bitmap)this.model.Image.Clone()); this.undoRedo.ClearRedoStack(); new Thread(() => { this.undoRedo.PushToUndoStack((Bitmap)this.model.Image.Clone()); this.undoRedo.ClearRedoStack(); BasicFilters.GrayscaleMarshal(this.model.Image); this.view.RedrawInvoker(); }).Start(); }