1. Device for compressing a source image comprising, a receiver for coding a base layer of the source image, and a signal generator for generating an enhancement layer by coding a residual existing between the source image and a base image of the base layer, the source image and the base image being structured as blocks of pixels, wherein a number of bits is allotted to the enhancement layer of a block (k), such number depending on a quality (psnr k ) of restitution of the block (k), determined by comparing the block in the source image with the block in the base image coded and reconstructed using the base layer.