Are you by chance running you application in the cloud? I came across the following while searching; >>Image-quality-loss
Additionally the widget description states the following:
Image quality
Be aware that setting this higher will be more taxing and will take longer to upload. If quality width and height are both set to 0, the image will be saved full size.
Perhaps that might help, taking the warning into consideration.