Improvements to drawBufferToImage.
Updates for JUCE.