Transfer GRAYSCALE_1BPP and RGB_24BPP arrays when possible.
Merge pull request #4381 from nnethercote/transfer

Transfer GRAYSCALE_1BPP and RGB_24BPP arrays when possible.