add n_components casting test
improve how RGBA buffers are copied to n_component
extend conversions to n_components to pad with 0s

Test coverage updated to check these cases.