Fix #31379: cycles not recognizing 16 bit tiff as float image.

This commit is contained in:
Brecht Van Lommel
2012-05-10 17:09:36 +00:00
parent 591a091003
commit 072a882d03

View File

@@ -60,20 +60,14 @@ 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();
} }