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; characterized in that: the shading detection pixels are located in the area defined by the image pixels.