Moved some transform-characteristic-related functions from common to
read/write, to avoid linking issues for read/write-specific libraries