Nonuniform weighted subsampling for digital image compression