1. An image sensor comprising a plurality of pixels arranged in rows and columns, the plurality of pixels comprising: image pixels arranged and adapted for providing image data, and shading detection pixels arranged and adapted for providing signals from which an amount of shading can be deduced; readout circuitry for readout of the image pixels; characterized in that: the shading detection pixels are located in the area defined by the image pixels such that the shading detection pixels are completely surrounded by image pixels; the shading detection pixels are arranged such that each shading detection pixel has at least one direct neighbouring image pixel, and the readout circuitry is configured to be used also for readout of the shading detection pixels.