A method for compressing an image comprising one or more blocks, each of the one or more blocks comprising an x channel, a y channel, and a z channel, the method comprising, for each of the one or more blocks: performing a frequency domain transform, by a processor, on each of the x, y, and z channels, comprising performing a wavelet transform on each of the channels; ordering, by the processor, the transformed x, y, and z channels into first, second, and third transformed channels (HR, HG, and HB); performing an inter-channel transform in accordance with the order of the first transformed channel, the second transformed channel, and the third transformed channel; and encoding the inter-channel transformed channels (HR, HG, and HB); wherein the ordering of the three transformed channels (HR, HG, and HB) comprises: computing an xy difference between the transformed x channel and the transformed y channel; computing an xz difference between the transformed x channel and the transformed z channel; computing a yz difference between the transformed y channel and the transformed z channel; and determining the ordering of the three transformed channels (HR, HG, and HB) in accordance with the xy difference, the xz difference, and the yz difference; characterized in that the determining of the ordering of the three transformed channels (HR, HG, and HB) comprises: when the xy difference is less than the yz difference and the xz difference is less than the yz difference, then ordering the x channel as the first channel, the y channel as the second channel, and the z channel as the third channel, when the yz difference is less than the xy difference and the xz difference is less than the xy difference, then ordering the z channel as the first channel, the y channel as the second channel, and the x channel as the third channel, and otherwise, ordering the y channel as the first channel, the x channel as the second channel, and the z channel as the third channel. performing a frequency domain transform, by a processor, on each of the x, y, and z channels, comprising performing a wavelet transform on each of the channels; ordering, by the processor, the transformed x, y, and z channels into first, second, and third transformed channels (HR, HG, and HB); performing an inter-channel transform in accordance with the order of the first transformed channel, the second transformed channel, and the third transformed channel; and encoding the inter-channel transformed channels (HR, HG, and HB); wherein the ordering of the three transformed channels (HR, HG, and HB) comprises: computing an xy difference between the transformed x channel and the transformed y channel; computing an xz difference between the transformed x channel and the transformed z channel; computing a yz difference between the transformed y channel and the transformed z channel; and determining the ordering of the three transformed channels (HR, HG, and HB) in accordance with the xy difference, the xz difference, and the yz difference; computing an xy difference between the transformed x channel and the transformed y channel; computing an xz difference between the transformed x channel and the transformed z channel; computing a yz difference between the transformed y channel and the transformed z channel; and determining the ordering of the three transformed channels (HR, HG, and HB) in accordance with the xy difference, the xz difference, and the yz difference; characterized in that the determining of the ordering of the three transformed channels (HR, HG, and HB) comprises: when the xy difference is less than the yz difference and the xz difference is less than the yz difference, then ordering the x channel as the first channel, the y channel as the second channel, and the z channel as the third channel, when the yz difference is less than the xy difference and the xz difference is less than the xy difference, then ordering the z channel as the first channel, the y channel as the second channel, and the x channel as the third channel, and otherwise, ordering the y channel as the first channel, the x channel as the second channel, and the z channel as the third channel. when the xy difference is less than the yz difference and the xz difference is less than the yz difference, then ordering the x channel as the first channel, the y channel as the second channel, and the z channel as the third channel, when the yz difference is less than the xy difference and the xz difference is less than the xy difference, then ordering the z channel as the first channel, the y channel as the second channel, and the x channel as the third channel, and otherwise, ordering the y channel as the first channel, the x channel as the second channel, and the z channel as the third channel.