static public ShortARGB InvertColor(ShortARGB colorInput)
 {
     return(new ShortARGB(colorInput.A,
                          255 - ImagePixels.ShortToByte(colorInput.R),
                          255 - ImagePixels.ShortToByte(colorInput.G),
                          255 - ImagePixels.ShortToByte(colorInput.B)));
 }
Esempio n. 2
0
        // ForEach set, zwraca klon poprzedniego obiektu
        public ImagePixels ForEachOnPixel(Func <ShortARGB, ShortARGB> func)
        {
            var clone = new ImagePixels(this);

            clone.ForEachAndSet(func);

            return(clone);
        }
Esempio n. 3
0
 // Konstruktor Kopiujący
 public ImagePixels(ImagePixels source)
 {
     Width   = source.Width;
     Height  = source.Height;
     DpiX    = source.DpiX;
     DpiY    = source.DpiY;
     BPS     = source.BPS;
     Stride  = source.Stride;
     Format  = source.Format;
     Palette = source.Palette;
     Pixels  = new short[Stride * Height];
     source.Bits.CopyTo(Pixels, 0);
 }