Bug: Exception when printing POS receipt via hardware proxy

An exception occurs when a receipt is printed via the hardware proxy if the company logo image has a palette.

1. Upload an image with a palette as the company logo.
2. Connect a hardware proxy and configure the point of sale that receipts are printed via the proxy ('Print via Proxy')
3. Place an order in the point of sale. The receipt will print the stack trace of an exception.

This exception is caused because a PIL.Image of type 'P' (palette) cannot be split into RGBA channels.
I'm not sure i like the kwargs, could you duplicate img.paste in two different lines depending on the number of channels ?