Exemple #1
0
        public unsafe static void ForEach(this UnmanagedImage <TPixel> src, ActionWithPosition handler)
        {
            Int32 width  = src.Width;
            Int32 height = src.Height;

            TPixel *p = (TPixel *)src.StartIntPtr;

            for (Int32 r = 0; r < height; r++)
            {
                for (Int32 w = 0; w < width; w++)
                {
                    handler(w, r, p);
                    p++;
                }
            }
        }
        public static unsafe void ForEach(this UnmanagedImage<TPixel> src, ActionWithPosition handler)
        {
            Int32 width = src.Width;
            Int32 height = src.Height;

            TPixel* p = (TPixel*)src.StartIntPtr;
            for (Int32 r = 0; r < height; r++)
            {
                for (Int32 w = 0; w < width; w++)
                {
                    handler(w, r, p);
                    p++;
                }
            }
        }