Abstract: A method and system for image coding, wherein an image is divided into a plurality of blocks for scanning. The pixels values in the scanned block are represented by a plurality of level-run value pairs, wherein the level value is indicative of a non-zero pixel value and the run value is indicative of the number of consecutive zero pixel values preceding the non-zero pixel value. A plurality of contexts indicative of the level-run value pairs are conveyed to a decoder for allowing the decoder to reconstruct the image based on the contexts. The assignment of the contexts is also based on the level value of a preceding level-run pair. Additionally, instead of an end-of-block symbol, the number of non-zero coefficients is provided to the decoder prior to conveying the contexts thereto.