Object boundaries detected by edge detection algorithms provide a rich, meaningful and sparse description of an image. In this study, we develop an image compression algorithm based on such a sparse description which is obtained by using weak membrane model of the image. In this approach, image is modelled as a collection of smooth regions separated by edge contours. This model allows us to determine edge contours, represented as line processes, by minimizing a nonconvex energy functional associated with a membrane, and to reconstruct the original image by using the same model. Thus despite the previous work where first edges are obtained by an edge detection algorithm based on convolution and then surface is reconstructed by using a completely different process such as interpolation, in our approach the same process is used for both detecting edges and reconstructing surfaces from them. We coded the line processes by using run length coding and the sparse data around line processes by using the entropy coding. We evaluate the performance of the algorithm qualitatively and quantitatively on various synthetic and real images, and show that good quality images can be obtained for moderate compression ratio like 5:1 while this ratio may reach up to 20:1 for some images.