A new compound image compression algorithm is proposed, based on Shape Primitive Extraction and Coding (SPEC). The SPEC first segments a compound image into text/graphics pixels and pictorial pixels, by extracting the shape primitives of text/graphics. Then all the shape primitives are losslessly compressed with a combined shape-based and palettebased coding algorithm. The remaining pictorial pixels are coded with JPEG2000. Experimental results show that the SPEC has very low complexity and provides visually lossless quality, while yielding competitive compression ratios. Keywords-compound image compression; compound image segmentation; shape primitive extraction; shape-based coding; palette-based coding