<p>The method involves scanning the bar code and the surroundings of the bar code by an optical sensor and receiving color- or gray scale image data of the bar code and the surroundings of the bar code. A characteristic of the bar code or the surroundings of the bar code is determined from the evaluated color and gray-scale image data.</p>