Updated with an easier way of adding new encoding function + added bmp e...

...ncoding funtion