A computer-implemented method of compressing a block of image data to satisfy a target level of compression, wherein the block of image data comprises a plurality of image element values, each image element value comprising one or more data values relating to a respective one or more channels, the method comprising: for each of the one or more channels: determining an origin value for the channel for the block; determining difference values representing differences between the data values and the determined origin value for the channel for the block; and determining a first number of bits for losslessly representing a maximum difference value of the difference values for the channel for the block; analysing said determined first number of bits for each of the one or more channels to determine a respective one or more second number of bits for each of the one or more channels, the one or more second number of bits being determined to ensure that representing each of the difference values for the one or more channels with said respective one or more second number of bits satisfies the target level of compression for compressing the block of image data; and forming compressed data, wherein the compressed data comprises, for each of the one or more channels: an indication of the determined origin value for the channel; an indication of said determined first number of bits for the channel; and representations of the determined difference values for the channel, wherein each of the representations of the determined difference values for the channel uses said determined second number of bits for the channel, such that the target level of compression is satisfied. for each of the one or more channels: determining an origin value for the channel for the block; determining difference values representing differences between the data values and the determined origin value for the channel for the block; and determining a first number of bits for losslessly representing a maximum difference value of the difference values for the channel for the block; determining an origin value for the channel for the block; determining difference values representing differences between the data values and the determined origin value for the channel for the block; and determining a first number of bits for losslessly representing a maximum difference value of the difference values for the channel for the block; analysing said determined first number of bits for each of the one or more channels to determine a respective one or more second number of bits for each of the one or more channels, the one or more second number of bits being determined to ensure that representing each of the difference values for the one or more channels with said respective one or more second number of bits satisfies the target level of compression for compressing the block of image data; and forming compressed data, wherein the compressed data comprises, for each of the one or more channels: an indication of the determined origin value for the channel; an indication of said determined first number of bits for the channel; and representations of the determined difference values for the channel, wherein each of the representations of the determined difference values for the channel uses said determined second number of bits for the channel, such that the target level of compression is satisfied. an indication of the determined origin value for the channel; an indication of said determined first number of bits for the channel; and representations of the determined difference values for the channel, wherein each of the representations of the determined difference values for the channel uses said determined second number of bits for the channel, such that the target level of compression is satisfied.