1. A computer-implemented method of transforming an image file by an image file transformation apparatus, the method comprising: providing an image file in a pixel-based format having a plurality of pixels; dividing the pixels into a plurality of patches; for each of the plurality of patches, sampling the pixels within a current patch to generate a plurality of boundary curves as boundary conditions for a partial differential equation, wherein the sampling comprises overlying a plurality of boundary selectors onto the plurality of pixels, sampling the plurality of pixels according to the plurality of boundary selectors to provide a plurality of sample points, and forming the boundary conditions as the boundary curves based on the sample points; deriving Fourier coefficients of a solution to the partial differential equation according to the boundary conditions; and outputting the Fourier coefficients for each of the plurality of patches as a transformed image file.