1. A method of encoding an image object consisting of pixel values at each of a plurality of pixel locations in a pixel array, the array being divided into a plurality of blocks of size N×N, at least one of said plurality of blocks being a boundary block including both at least one pixel of said image object and at least one further pixel, the method including for each boundary block: (i) deriving K object elements which are respectively the pixel values of K pixels of the image object within the boundary block spaced along a first direction; (ii) employing said K object elements to obtain (N−K) padding elements; (iii) deriving a padded vector consisting of said K object elements and said (N−K) padding elements , ; and (iv) transforming the padded vector using a predetermined N×N transform matrix to produce a transformed vector, wherein said transformed vector has (N−K) elements in (N−K) predetermined transform locations which are zero.