Fix T83586: Cycles failing to load OpenEXR image with EXR RGBAZ channels
Don't refuse to load 5-channel images, instead drop any channels after the 4th and hope that the first channels represent RGBA. Differential Revision: https://developer.blender.org/D9820
This commit is contained in:
parent
97651f428b
commit
93c67b0b8e
Notes:
blender-bot
2024-03-22 15:57:27 +01:00
Referenced by issue #83586, Cycles cannot read single part 5 channel RGBAZ EXR files that it produces.
|
@ -493,8 +493,8 @@ static bool image_associate_alpha(ImageManager::Image *img)
|
|||
template<TypeDesc::BASETYPE FileFormat, typename StorageType>
|
||||
bool ImageManager::file_load_image(Image *img, int texture_limit)
|
||||
{
|
||||
/* we only handle certain number of components */
|
||||
if (!(img->metadata.channels >= 1 && img->metadata.channels <= 4)) {
|
||||
/* Ignore empty images. */
|
||||
if (!(img->metadata.channels > 0)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue