Fix #31379: cycles not recognizing 16 bit tiff as float image.
This commit is contained in:
@@ -60,19 +60,13 @@ static bool is_float_image(const string& filename)
|
|||||||
|
|
||||||
if(in->open(filename, spec)) {
|
if(in->open(filename, spec)) {
|
||||||
/* check the main format, and channel formats;
|
/* check the main format, and channel formats;
|
||||||
if any are non-integer, we'll need a float texture slot */
|
if any take up more than one byte, we'll need a float texture slot */
|
||||||
if(spec.format == TypeDesc::HALF ||
|
if(spec.format.basesize() > 1)
|
||||||
spec.format == TypeDesc::FLOAT ||
|
|
||||||
spec.format == TypeDesc::DOUBLE) {
|
|
||||||
is_float = true;
|
is_float = true;
|
||||||
}
|
|
||||||
|
|
||||||
for(size_t channel = 0; channel < spec.channelformats.size(); channel++) {
|
for(size_t channel = 0; channel < spec.channelformats.size(); channel++) {
|
||||||
if(spec.channelformats[channel] == TypeDesc::HALF ||
|
if(spec.channelformats[channel].basesize() > 1)
|
||||||
spec.channelformats[channel] == TypeDesc::FLOAT ||
|
|
||||||
spec.channelformats[channel] == TypeDesc::DOUBLE) {
|
|
||||||
is_float = true;
|
is_float = true;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
in->close();
|
in->close();
|
||||||
|
Reference in New Issue
Block a user