Driven by the need for seismic data compression with high dynamic range and 32-bit resolution, we propose two algorithms to efficiently and precisely control the signal-to-noise ratio (SNR) and bit rate in JPEG XR image compression to allow users to compress seismic data with a target SNR or a target bit rate. Based on the quantization properties of JPEG XR and the nature of blank macroblocks, we build a reliable model between the quantization parameter (QP) and SNR. This enables us to estimate the right QP with target quality for the JPEG XR encoder.