Conventional intraframe coding is performed in two steps. First, a block of pixels are predicted by copying previously reconstructed neighbor pixels of the block along an angular direction inside the block. Then, the prediction residual block is transform coded with the well-known 2D discrete cosine transform (DCT). Recently, it has been shown that transforming the intraprediction residuals with the odd type-3 discrete sine transform along the prediction direction and the DCT along the perpendicular direction improves the compression performance. More recently, a recursive prediction approach has been proposed to improve intra prediction performance. Both of these recent approaches utilize Markov processes to develop improvements in either the transform or the prediction step but not in both. In this paper, both the intraprediction and the transform steps are obtained based on 2D Markov processes. The derived overall intraframe coding approaches can generalize the mentioned two approaches, provide improved coding gains and produce less blocking effects at low bitrates.