An image processing apparatus (100; 110) for compressing or decompressing a segment of an image, the segment being non-rectangular and comprising a plurality of pixels, each pixel comprising a pixel value, the pixel values of the plurality of pixels forming a pixel value vector, the apparatus (100; 110) comprising: a processor (101; 111) configured to compress the segment or configured to decompress the segment, wherein compressing the segment comprises computing a plurality of expansion coefficients by expanding the pixel value vector into a plurality of basis vectors, and wherein decompressing the segment comprises computing the pixel value vector by forming a linear combination of the basis vectors according to the plurality of expansion coefficients; characterised in that : the basis vectors are discrete approximations of solutions of a boundary problem of the Helmholtz equation on the segment of the image; wherein the processor (101; 111) is configured to represent a discretized Laplace operator of the Helmholtz equation as a system matrix A and to determine the basis vectors as eigenvectors of the system matrix A; wherein compressing the segment comprises compressing the segment on a basis of the eigenvectors of the system matrix A; and decompressing the segment comprises decompressing the segment on the basis of the eigenvectors of the system matrix A. a processor (101; 111) configured to compress the segment or configured to decompress the segment, wherein compressing the segment comprises computing a plurality of expansion coefficients by expanding the pixel value vector into a plurality of basis vectors, and wherein decompressing the segment comprises computing the pixel value vector by forming a linear combination of the basis vectors according to the plurality of expansion coefficients; characterised in that : the basis vectors are discrete approximations of solutions of a boundary problem of the Helmholtz equation on the segment of the image; wherein the processor (101; 111) is configured to represent a discretized Laplace operator of the Helmholtz equation as a system matrix A and to determine the basis vectors as eigenvectors of the system matrix A; wherein compressing the segment comprises compressing the segment on a basis of the eigenvectors of the system matrix A; and decompressing the segment comprises decompressing the segment on the basis of the eigenvectors of the system matrix A. the basis vectors are discrete approximations of solutions of a boundary problem of the Helmholtz equation on the segment of the image; wherein the processor (101; 111) is configured to represent a discretized Laplace operator of the Helmholtz equation as a system matrix A and to determine the basis vectors as eigenvectors of the system matrix A; wherein compressing the segment comprises compressing the segment on a basis of the eigenvectors of the system matrix A; and decompressing the segment comprises decompressing the segment on the basis of the eigenvectors of the system matrix A. wherein compressing the segment comprises compressing the segment on a basis of the eigenvectors of the system matrix A; and decompressing the segment comprises decompressing the segment on the basis of the eigenvectors of the system matrix A. <EOS>