Axiom.Media.OptimizedPixelConversion.X8B8G8R8toR8G8B8A8Converter.Convert C# (CSharp) Method

Convert() public method

public Convert ( byte input, byte output, int offset ) : void
input byte
output byte
offset int
return void
			public unsafe void Convert( byte* input, byte* output, int offset )
			{
				uint* inputPtr = (uint*)input, outputPtr = (uint*)output;
				uint inp = inputPtr[ offset ];

				outputPtr[ offset ] = ( ( inp & 0x0000FF ) << 24 ) | ( ( inp & 0xFF0000 ) >> 8 ) | ( ( inp & 0x00FF00 ) << 8 ) | 0x000000FF;
			}
		}
OptimizedPixelConversion.X8B8G8R8toR8G8B8A8Converter