public GetComponentsAt ( int column, byte &r, byte &g, byte &b ) : void | ||
column | int | |
r | byte | |
g | byte | |
b | byte | |
return | void |
public void GetComponentsAt(int column, out byte r, out byte g, out byte b)
{
//no alpha channel for jpeg
switch (componentsPerSample)
{
case 1:
{
r = g = b = (byte)lineBuffer[column];
}
break;
case 2:
{
//2 byte per sample?
throw new NotSupportedException(); //?
}
case 3:
{
int pos = column * 3;
r = (byte)lineBuffer[pos];
g = (byte)lineBuffer[pos + 1];
b = (byte)lineBuffer[pos + 2];
}
break;
case 4:
{
//should not occurs?
throw new NotSupportedException(); //?
}
default:
throw new NotSupportedException();
}
}
public void WriteToList(System.Collections.Generic.List<byte> outputBytes)