This article presents a complete still image coder for gray scale images. The coder is based on segmenting the image into homogeneous objects which are coded independently. The coder consist of three parts: segmentation, edge coding and texture coding. The segmentation is done by using mathematical morphology. The segments are then coded by representing the edges between segments by a chain code, while the texture within each segment is coded in two steps. A first approximation of the the image texture is made by fitting a second order surface to each object. The error surface is then coded by AR modelling using the analysis-by-synthesis principle. Best results are obtained for head and shoulder images.