When setting a format, return the bytesperline to the caller so that it can be used to allocate buffers.