How to get all pixel values of a certain area on the screen?

How to get all pixel values ​​of a certain area on the screen?

I want to blur by feeding these pixel values ​​into my gaussian blur function, hoping to achieve a gaussian blur effect on the screen