Abstract: A method for encoding an image, the encoding being a mixed encoding with the possibility of using a first lossless compression type, and a second lossy compression type, the method including: dividing the image into a plurality of elementary blocks; determining which elementary blocks have a high level of detail; allocating the first type of compression to each elementary block that has a high level of detail; allocating the second compression type to each elementary block that does not have a high level of detail; applying the first type of compression to each elementary block to which the first compression type has been allocated; applying the first compression type to each elementary block directly surrounded by two elementary blocks to which the first compression type has been allocated.