We introduce a low-complexity codec for lossy compression of hyperspectral images. These images have two kinds of redundancies: 1) spatial; and 2) spectral. Our coder is based on a compression scheme consisting in applying a 2-D discrete wavelet transform (DWT) to each component and a linear transform between components to reduce, respectively, spatial and spectral redundancies. The DWT used is the Daubechies 9/7. However, the spectral transform depends on the spectrometer sensor and the kind of images to be encoded. It is calculated once and for all on a set of images (the learning basis) from (only) one sensor, thanks to Akam Bita et al. 's OrthOST algorithm that returns an orthogonal spectral transform, whose optimality in high-rate coding has been recently proved under mild conditions. The spectral transform obtained in this way is applied to encode other images from the same sensor. Quantization and entropy coding are then achieved with a well-suited extension to hyperspectral images of the Said and Pearlman's SPIHT algorithm. Comparisons with a JPEG2000 codec using the Karhunen-Loève transform (KLT) to reduce spectral redundancy show good performance for our codec.