endroid/QrCode — pull request #17 by rk (2014-07-02 13:30:16+00:00)
Title: Improved padding behavior to preserve size

I wanted a crisper appearance when adding padding, and I noticed that padding was subtracted from the image size. When the QRCode size is automatically determined the padding is not factored in, which means that the destination size for the code is `size - padding * 2`. And with a smaller destination area the code gets resampled. But by adding padding to the destination image size we can get a much sharper image by keeping the code's size the same.

Example with padding:

![test](https://cloud.githubusercontent.com/assets/58199/3456248/b08ee282-01ec-11e4-9394-7b8a9f159e93.png)

Illustration:

```
From (Size - Padding):

|----------- Size -----------|

+----------------------------+ —
| | | Padding
| +----------------------+ | —
| | | | |
| | | | |
| | | | |
| | | | | Size - Padding
| | | | |
| | | | |
| | | | |
| +----------------------+ | —
| |
+----------------------------+

To (Size + Padding):

+----------------------------+ —
| | | Padding
| +----------------------+ | —
| | | | |
| | | | |
| | | | |
| | | | | Size
| | | | |
| | | | |
| | | | |
| +----------------------+ | —
| |
+----------------------------+
```