A lossy image compression codec using RTrees