Implemented image compression