C# 클래스 Axiom.Media.PixelConverter

A class to convert/copy pixels of the same or different formats
파일 보기 프로젝트 열기: WolfgangSt/axiom 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
IndexedPixelFormats Axiom.Media.PixelFormatDescription[]
UnindexedPixelFormats Axiom.Media.PixelFormatDescription[]

공개 메소드들

메소드 설명
BulkPixelConversion ( IntPtr srcBytes, int srcOffset, PixelFormat srcFormat, IntPtr dstBytes, int dstOffset, PixelFormat dstFormat, int count ) : void

Convert consecutive pixels from one format to another. No dithering or filtering is being done. Converting from RGB to luminance takes the R channel. In case the source and destination format match, just a copy is done.

BulkPixelConversion ( PixelBox src, PixelBox dst ) : void

Convert pixels from one format to another. No dithering or filtering is being done. Converting from RGB to luminance takes the R channel.

The source and destination boxes must have the same dimensions. In case the source and destination format match, a plain copy is done.

GetDescriptionFor ( PixelFormat format ) : Axiom.Media.PixelFormatDescription
Initialize ( ) : void
PackColor ( ColorEx color, PixelFormat format, IntPtr dest ) : void

Pack a color value to memory

PackColor ( float r, float g, float b, float a, PixelFormat format, IntPtr dest ) : void

Pack a color value to memory

PackColor ( uint r, uint g, uint b, uint a, PixelFormat format, IntPtr dest ) : void

Pack a color value to memory

UnpackColor ( PixelFormat pf, IntPtr src ) : ColorEx

Unpack a color value from memory

UnpackColor ( byte &r, byte &g, byte &b, byte &a, PixelFormat pf, IntPtr src ) : void

Unpack a color value from memory

This function returns the color components in 8 bit precision, this will lose precision when coming from A2R10G10B10 or floating point formats.

UnpackColor ( float &r, float &g, float &b, float &a, PixelFormat pf, IntPtr src ) : void

Unpack a color value from memory

메소드 상세

BulkPixelConversion() 공개 정적인 메소드

Convert consecutive pixels from one format to another. No dithering or filtering is being done. Converting from RGB to luminance takes the R channel. In case the source and destination format match, just a copy is done.
public static BulkPixelConversion ( IntPtr srcBytes, int srcOffset, PixelFormat srcFormat, IntPtr dstBytes, int dstOffset, PixelFormat dstFormat, int count ) : void
srcBytes System.IntPtr Pointer to source region
srcOffset int
srcFormat PixelFormat Pixel format of source region
dstBytes System.IntPtr Pointer to destination region
dstOffset int
dstFormat PixelFormat Pixel format of destination region
count int
리턴 void

BulkPixelConversion() 공개 정적인 메소드

Convert pixels from one format to another. No dithering or filtering is being done. Converting from RGB to luminance takes the R channel.
The source and destination boxes must have the same dimensions. In case the source and destination format match, a plain copy is done.
public static BulkPixelConversion ( PixelBox src, PixelBox dst ) : void
src PixelBox PixelBox containing the source pixels, pitches and format
dst PixelBox PixelBox containing the destination pixels, pitches and format
리턴 void

GetDescriptionFor() 공개 정적인 메소드

public static GetDescriptionFor ( PixelFormat format ) : Axiom.Media.PixelFormatDescription
format PixelFormat
리턴 Axiom.Media.PixelFormatDescription

Initialize() 공개 정적인 메소드

public static Initialize ( ) : void
리턴 void

PackColor() 공개 정적인 메소드

Pack a color value to memory
public static PackColor ( ColorEx color, PixelFormat format, IntPtr dest ) : void
color Axiom.Core.ColorEx The color
format PixelFormat Pixel format in which to write the color
dest System.IntPtr Destination memory location
리턴 void

PackColor() 공개 정적인 메소드

Pack a color value to memory
public static PackColor ( float r, float g, float b, float a, PixelFormat format, IntPtr dest ) : void
r float /// The four color components, range 0.0f to 1.0f /// (an exception to this case exists for floating point pixel /// formats, which don't clamp to 0.0f..1.0f) ///
g float /// The four color components, range 0.0f to 1.0f /// (an exception to this case exists for floating point pixel /// formats, which don't clamp to 0.0f..1.0f) ///
b float /// The four color components, range 0.0f to 1.0f /// (an exception to this case exists for floating point pixel /// formats, which don't clamp to 0.0f..1.0f) ///
a float /// The four color components, range 0.0f to 1.0f /// (an exception to this case exists for floating point pixel /// formats, which don't clamp to 0.0f..1.0f) ///
format PixelFormat Pixelformat in which to write the color
dest System.IntPtr Destination memory location
리턴 void

PackColor() 공개 정적인 메소드

Pack a color value to memory
public static PackColor ( uint r, uint g, uint b, uint a, PixelFormat format, IntPtr dest ) : void
r uint Red component, range 0x00 to 0xFF
g uint Green component, range 0x00 to 0xFF
b uint Blue component, range 0x00 to 0xFF
a uint Alpha component, range 0x00 to 0xFF
format PixelFormat Pixelformat in which to write the color
dest System.IntPtr Destination memory location
리턴 void

UnpackColor() 공개 정적인 메소드

Unpack a color value from memory
public static UnpackColor ( PixelFormat pf, IntPtr src ) : ColorEx
pf PixelFormat Pixelformat in which to read the color
src System.IntPtr Source memory location
리턴 Axiom.Core.ColorEx

UnpackColor() 공개 정적인 메소드

Unpack a color value from memory
This function returns the color components in 8 bit precision, this will lose precision when coming from A2R10G10B10 or floating point formats.
public static UnpackColor ( byte &r, byte &g, byte &b, byte &a, PixelFormat pf, IntPtr src ) : void
r byte The color is returned here (as byte)
g byte The color is returned here (as byte)
b byte The color is returned here (as byte)
a byte The color is returned here (as byte)
pf PixelFormat Pixelformat in which to read the color
src System.IntPtr Source memory location
리턴 void

UnpackColor() 공개 정적인 메소드

Unpack a color value from memory
public static UnpackColor ( float &r, float &g, float &b, float &a, PixelFormat pf, IntPtr src ) : void
r float The color is returned here (as float)
g float The color is returned here (as float)
b float The color is returned here (as float)
a float The color is returned here (as float)
pf PixelFormat Pixelformat in which to read the color
src System.IntPtr Source memory location
리턴 void

프로퍼티 상세

IndexedPixelFormats 보호되어 있는 정적으로 프로퍼티

protected static PixelFormatDescription[],Axiom.Media IndexedPixelFormats
리턴 Axiom.Media.PixelFormatDescription[]

UnindexedPixelFormats 보호되어 있는 정적으로 프로퍼티

Pixel format database
protected static PixelFormatDescription[],Axiom.Media UnindexedPixelFormats
리턴 Axiom.Media.PixelFormatDescription[]