In this paper we will present LILY, a software package for image processing. LILY stands for Leuven Image processing LibrarY and has been developed with funding from a large number of Belgian industrial companies who are all interested in visual inspection problems. Therefore, the algorithms in the package are mainly concerned with this application field, although also other algorithms are incorporated. All procedures have been written in Pascal and Fortran on a VAX running VMS, with current work being done to convert the package to the C-language. Along with the programmed algorithms come a large number of support functions and procedures to facilitate the development of image processing programs. The package thus presents itself to the user as a large toolbox from which the appropriate tools must be taken to accomplish a certain task. The available procedures fall in one of the following categories: segmentation, coding, filtering, feature extraction, classification, texture analysis, relaxation, and pyramidal structures. In the first part of the paper, an overview will be given of the algorithms that are present in all these different classes. Syntactical conventions, documentation, maintenance and development tools will be discussed also. The second part of the paper is devoted to some specific problems that have been solved as a testcase for the algorithms. First Laws' procedure for texture segmentation is implemented and applied to the detection of defects in textiles. The procedure involves filtering the image with one or more suitably chosen masks, squaring the obtained values, computing the energy as a texture feature and classifying the resulting values. Each of these steps corresponds more or less to a different module of the package. A second industrial problem of defect inspection in unexposed radiographic film has been approached using three alternative techniques: one dimensional convolution filtering, Fourier domain filtering and polynomial regression.