Looking into this a bit closer it seems like the error occurs when the image is 31x27 pixels exactly, has transparent pixels and is png 8-bit... really strange