The most widely accepted representation of an image is the matrix representation in which each element has numerical information such as a color or a gray level. However, as long as such representation is used, it is not so easy to have operations based on global information. This paper proposes an alternative representation of an image called `contour representation.' For each gray level i we compute boundaries of connected regions of pixels with gray levels greater than or equal to i. It is easy to reconstruct an original image from those boundaries. Representation of an image as a collection of those boundary lines (contour lines) associated with gray levels is the contour representation of an image. We first give an output-sensitive algorithm for computing all those contour lines and a compact way of such representation. Then, an image can be dealt with as a set of geometric objects. This leads to several advantageous features such as improving resolution or restoration of flaw regions, which cannot be accomplished in conventional pixel-based approaches. Experimental results are also included.