Handled different color/depth resolutions.