A novel context template design method is presented for lossless compression of halftone images. In each pixel traversal, the proposed method modifies context template according to inter-pixel correlation. Then, each pixel is arithmetic coded by using the updated context template. Based on its adaptation to local pixel correlation, the proposed design scheme outperforms the standard JBIG arithmetic coding by 29 % of bit saving.