A computer implemented method for pre-processing an image, wherein the image has a predetermined bit depth, the method comprising the steps of: in a level 1: performing a predetermined transform on the image, thereby decomposing the image in: a low frequency subband of the level 1 comprising low frequency components in both a horizontal direction and a vertical direction; at least one high frequency subband (112, 113, 114) of the level 1 comprising high frequency components in at least one of the horizontal direction and the vertical direction; for each level n, with n going from 2 up to a predetermined N, and with N being at least 2: performing the predetermined transform on the low frequency subband (111; 121) of the level n-1, thereby decomposing the low frequency subband (111; 121) of the level n-1 in a low frequency subband (121; 131) and at least one high frequency subband (122, 123, 124; 132, 133, 134) of the level n; resizing the at least one high frequency subband (122, 123, 124; 132, 133, 134) of the level n to the size of the corresponding at least one high frequency subband (112, 113, 114; 122, 123, 124) of the level n-1; subtracting the resized at least one high frequency subband of the level n from the corresponding at least one high frequency subband (112, 113, 114; 122, 123, 124) of the level n-1 to obtain at least one subtracted subband (212, 213, 214; 222, 223, 224) of the level n-1; storing the at least one subtracted subband (212, 213, 214; 222, 223, 224) of the level n-1 as part of a pre-processed image; and characterized in that the method further comprising, the step of, in the level N: storing the low frequency subband of the level N-1 as part of the pre-processed image, and wherein the method further comprises the step of converting the pre-processed image to the predetermined bit depth. in a level 1: performing a predetermined transform on the image, thereby decomposing the image in: a low frequency subband of the level 1 comprising low frequency components in both a horizontal direction and a vertical direction; at least one high frequency subband (112, 113, 114) of the level 1 comprising high frequency components in at least one of the horizontal direction and the vertical direction; for each level n, with n going from 2 up to a predetermined N, and with N performing a predetermined transform on the image, thereby decomposing the image in: a low frequency subband of the level 1 comprising low frequency components in both a horizontal direction and a vertical direction; at least one high frequency subband (112, 113, 114) of the level 1 comprising high frequency components in at least one of the horizontal direction and the vertical direction; a low frequency subband of the level 1 comprising low frequency components in both a horizontal direction and a vertical direction; at least one high frequency subband (112, 113, 114) of the level 1 comprising high frequency components in at least one of the horizontal direction and the vertical direction; for each level n, with n going from 2 up to a predetermined N, and with N being at least 2: performing the predetermined transform on the low frequency subband (111; 121) of the level n-1, thereby decomposing the low frequency subband (111; 121) of the level n-1 in a low frequency subband (121; 131) and at least one high frequency subband (122, 123, 124; 132, 133, 134) of the level n; resizing the at least one high frequency subband (122, 123, 124; 132, 133, 134) of the level n to the size of the corresponding at least one high frequency subband (112, 113, 114; 122, 123, 124) of the level n-1; subtracting the resized at least one high frequency subband of the level n from the corresponding at least one high frequency subband (112, 113, 114; 122, 123, 124) of the level n-1 to obtain at least one subtracted subband (212, 213, 214; 222, 223, 224) of the level n-1; storing the at least one subtracted subband (212, 213, 214; 222, 223, 224) of the level n-1 as part of a pre-processed image; and characterized in that the method further comprising, the step of, in the level N: storing the low frequency subband of the level N-1 as part of the pre-processed image, and performing the predetermined transform on the low frequency subband (111; 121) of the level n-1, thereby decomposing the low frequency subband (111; 121) of the level n-1 in a low frequency subband (121; 131) and at least one high frequency subband (122, 123, 124; 132, 133, 134) of the level n; resizing the at least one high frequency subband (122, 123, 124; 132, 133, 134) of the level n to the size of the corresponding at least one high frequency subband (112, 113, 114; 122, 123, 124) of the level n-1; subtracting the resized at least one high frequency subband of the level n from the corresponding at least one high frequency subband (112, 113, 114; 122, 123, 124) of the level n-1 to obtain at least one subtracted subband (212, 213, 214; 222, 223, 224) of the level n-1; storing the at least one subtracted subband (212, 213, 214; 222, 223, 224) of the level n-1 as part of a pre-processed image; and characterized in that the method further comprising, the step of, in the level N: storing the low frequency subband of the level N-1 as part of the pre-processed image, and