  We present a method for detecting cosmic rays in single images. The algorithm
is based on simple analysis of the histogram of the image data and does not use
any modeling of the picture of the object. It does not require a good signal to
noise ratio in the image data. Identification of multiple-pixel cosmic-ray hits
is realized by running the procedure for detection and replacement iteratively.
The tests performed by us, show that the method is very effective, when applied
to the images with the spectroscopic data. It is also very fast in comparison
with other single image algorithms found in astronomical data processing
packages. Practical implementation and examples of application are presented.
