Moved texture pixel conversion to constructor.