In this work we analyse the capacity of the distributed MIMO uplink when transform coding is applied locally at each remote radio head (RRH) to compress fronthaul traffic. Assuming the use of optimal scalar compression, we derive a closed form capacity expression for the distributed MIMO uplink under Gaussian signalling, which is shown to be a function of both local and global channel eigendecompositions. We then outline two rate allocation schemes for efficiently allocating the available fronthaul to the compressed scalars, based on either local or global channel state information (CSI). Numerical results under Rayleigh fading conditions are presented which show that transform coding can provide a significant compression gain relative to direct signal quantisation, which grows as the number of antennas deployed at each RRH increases. Results also show that allocating fronthaul based on global CSI significantly improves performance, especially as the number of RRHs deployed increases.