There are several image processing algorithms for enhancement, restoration, segmentation or feature extraction that assume known statistical distribution for the noise from a corrupted image. Usually this noise is considered uncorrelated, but there are many cases where the strength of a certain algorithm must be tested for spatially correlated noise. Our main point is to derive a method for controlling the autocorrelation function of gamma distributed noise images. The exponential case is included. An uncorrelated noise generating algorithm that yields Gaussian, exponential and gamma distributed images of a good statistical quality is also presented.