Plugin or CSS to Shrink Image when Content Scrolls Up

Does anyone know of a plugin or even share some css that will shrink a full width image as the page scrolls up. Alot of apps that have full width images at the top will shrink the image div vertically keeping the image covering and centered.