Example #1
0
        public CoreColor CopyByRow()
        {
            CoreImage source = new CoreImage(1024, 768);
            CoreImage target = new CoreImage(1024, 768);

            using (PixelAccessor <CoreColor, uint> sourcePixels = source.Lock())
                using (PixelAccessor <CoreColor, uint> targetPixels = target.Lock())
                {
                    Parallel.For(
                        0,
                        source.Height,
                        Bootstrapper.Instance.ParallelOptions,
                        y =>
                    {
                        sourcePixels.CopyBlock(0, y, targetPixels, 0, y, source.Width);
                    });

                    return(targetPixels[0, 0]);
                }
        }