In this paper, we present a novel hybrid image coding scheme for real-time applications of computer screen video transmission. Based on the Mixed Raster Content (MRC) multilayer imaging model, the background picture is compressed with lossy JPEG, and the foreground layer consisting of text and graphics is compressed with a block-based lossless coding algorithm, which integrates shape-based coding, palette-based coding, palette reuse, and LZW algorithm. The key technique is to extract text and graphics from background pictures accurately and with low complexity. Shape primitives, such as lines, rectangles, and isolated pixels with prominent colors, are found to be significant clues for textual and graphical contents. The shape-based coding in our lossless algorithm provides intelligence to extract the computer-generated text and graphics elegantly and easily. Experimental results demonstrate the efficiency and low complexity of our proposed hybrid image coding scheme.