Change of pixel layer size based on the data