namespace ScreenConnect; public abstract class SimpleScreenCodec : ScreenCodec { protected int BitsPerPixel { get; } protected int RowPadding { get; } protected SimpleScreenCodec(int bitsPerPixel, int rowPadding) { BitsPerPixel = bitsPerPixel; RowPadding = rowPadding; } protected int GetRowLength(int width) { return Extensions.DivUp(width * BitsPerPixel, 8) + RowPadding; } }