This may or may not suit your requirements. It loses lots of information, but maybe good enough for you.
You will need