Axiom.Media.OptimizedPixelConversion.B8G8R8toA8R8G8B8Converter.Convert C# (CSharp) Метод

Convert() публичный Метод

public Convert ( byte input, byte output, int offset ) : void
input byte
output byte
offset int
Результат void
			public unsafe void Convert( byte* input, byte* output, int offset )
			{
				Col3b* inputPtr = (Col3b*)input;
				uint* outputPtr = (uint*)output;
				Col3b inp = inputPtr[ offset ];

				int xshift = 0, yshift = 8, zshift = 16, ashift = 24;

#if BIG_ENDIAN
				outputPtr[ offset ] = ( (uint)( 0xFF << ashift ) ) | ( ( (uint)inp.x ) << xshift ) | ( ( (uint)inp.y ) << yshift ) | ( ( (uint)inp.z ) << zshift );
#else
				outputPtr[ offset ] = ( (uint)( 0xFF << ashift ) ) | ( ( (uint)inp.x ) << zshift ) | ( ( (uint)inp.y ) << yshift ) | ( ( (uint)inp.z ) << xshift );
#endif
			}
		}
OptimizedPixelConversion.B8G8R8toA8R8G8B8Converter