mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-02 09:52:27 -04:00
*** empty log message ***
This commit is contained in:
parent
bdf18fb689
commit
4f9ef24895
@ -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) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user