Adaptively Lossy Image Compression For Onboard Processing