A row gets deleted when using plt.imsave

I’m running the following on mpl 1.2.1:

import matplotlib.pyplot as plt
import numpy as np

A = np.arange(1020*1368*3, dtype=np.uint8).reshape(1020, 1368, 3)
plt.imsave('dimcheck.png', A)

The OS tells me the picture has 1019x1368px. So one row is missing. It works fine for e.g. 10x10x3, I’m not yet sure why it does this for this specific dimension. PIL’s save method works fine, as does pypng.

I can’t check the behaviour on my other machine for now, because that one has mpl 1.1.1 and plt.imsave apparently did not yet support 24-bit RGB writing at that time (in 1.1.1: TypeError: from_bounds() takes exactly 4 arguments (5 given)).

Is this a bug or is there something wrong with my setup?