1. A method of applying defective pixel fixing to image data, the image data comprising pixel values for a regular array of pixels in a plurality of colour channels, wherein the method comprises, for a target pixel in a target colour channel of said regular array of pixels, the target pixel having a given pixel value: for each of a plurality of directions which intercept the target pixel: (a) determining a gradient of pixel values in one of said colour channels along said direction; and (b) determining a candidate value for the target pixel using: (i) the determined gradient, and (ii) a pixel value of a pixel in the target colour channel which is aligned with the target pixel along said direction; determining the median of the plurality of candidate values determined for the respective plurality of directions, wherein the determined median is used as a predicted value for the target pixel; determining whether the target pixel is characteristic of a defective pixel based on the similarity of the given value of the target pixel and the predicted value; and selectively replacing the given value of the target pixel with the predicted value based on the determination as to whether the target pixel is characteristic of a defective pixel.