Resize input QR Code image

Resize input QR Code image to a maximum of width x height = 1024x1024 (keeping aspect ratio), to handle big images taken with mobile cameras.