All pastes #521183 Raw Edit

Someone

public text v1 · immutable
#521183 ·published 2007-05-30 03:49 UTC
rendered paste body
        public unsafe void Blur()
        {
            unchecked
            {
                uint* Gfx = (uint*)m_data.Scan0.ToPointer();
                int screen_size = m_data.Width * m_data.Height;
                int screen_width = m_data.Width;

                Gfx += screen_width * 2;
                for(int i = screen_width * 2; i < screen_size - screen_width * 2; i++, Gfx++)
                {
                    Gfx[0] =
                        ((Gfx[screen_width<<1] >> 2) & 0x3F3F3F) +
                        ((Gfx[1] >> 2) & 0x3F3F3F) +
                        ((Gfx[-1] >> 2) & 0x3F3F3F) +
                        ((Gfx[screen_width] >> 2) & 0x3F3F3F)
                        ;
                }
            }
        }