*** empty log message ***

This commit is contained in:
David Rose 2000-12-20 01:08:27 +00:00
parent bdf18fb689
commit 4f9ef24895

View File

@ -268,14 +268,8 @@ post_txa_file() {
_y_size = _request._y_size; _y_size = _request._y_size;
} }
if (_request._got_num_channels) { // Examine the image to determine if we can downgrade the number
_properties._got_num_channels = true; // of channels, for instance from color to grayscale.
_properties._num_channels = _request._num_channels;
} else {
// If we didn't request a particular number of channels, examine
// the image to determine if we can downgrade it, for instance
// from color to grayscale.
if (_properties._got_num_channels && if (_properties._got_num_channels &&
(_properties._num_channels == 3 || _properties._num_channels == 4)) { (_properties._num_channels == 3 || _properties._num_channels == 4)) {
consider_grayscale(); consider_grayscale();
@ -286,6 +280,11 @@ post_txa_file() {
(_properties._num_channels == 2 || _properties._num_channels == 4)) { (_properties._num_channels == 2 || _properties._num_channels == 4)) {
consider_unalpha(); consider_unalpha();
} }
// However, if we got an explicit request for channels, honor that.
if (_request._got_num_channels) {
_properties._got_num_channels = true;
_properties._num_channels = _request._num_channels;
} }
if (_request._format != EggTexture::F_unspecified) { if (_request._format != EggTexture::F_unspecified) {