2-D Fourier series components from image


Suppose I draw a black/white image where the color black represents 1.0 and the color white represents 0. Is there a way to extract numerical estimates for the coefficients of a (real) 2-D Fourier series which approximates this image?

Here is a simple example: enter image description here

What about for more complex images such as:

enter image description here

or

enter image description here