Utilities.Media.SwiftBitmap.ApplyColorMatrix C# (CSharp) Méthode

ApplyColorMatrix() public méthode

Applies the matrix.
public ApplyColorMatrix ( System matrix ) : SwiftBitmap
matrix System The matrix.
Résultat SwiftBitmap
        public SwiftBitmap ApplyColorMatrix(System.Drawing.Imaging.ColorMatrix matrix)
        {
            Contract.Requires<ArgumentNullException>(matrix != null);
            Contract.Requires<NullReferenceException>(InternalBitmap != null);
            Unlock();
            using (Graphics NewGraphics = Graphics.FromImage(InternalBitmap))
            {
                using (ImageAttributes Attributes = new ImageAttributes())
                {
                    Attributes.SetColorMatrix(matrix);
                    NewGraphics.DrawImage(InternalBitmap,
                        new System.Drawing.Rectangle(0, 0, Width, Height),
                        0, 0, Width, Height,
                        GraphicsUnit.Pixel,
                        Attributes);
                }
            }
            return this;
        }

Same methods

SwiftBitmap::ApplyColorMatrix ( float matrix ) : SwiftBitmap