Skip to content

Commit 29eddb1

Browse files
authored
Merge pull request #1337 from vfxenjoyer/oiio-backwards-compatiblity
ImageReader : Check for oiio version before calling read_native_deep_x
2 parents 98eb5b8 + 8f03dd0 commit 29eddb1

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

Changes

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
10.4.x.x (relative to 10.4.5.0)
2+
========
3+
4+
Fixes
5+
-----
6+
- ImageReader : Fixed compilation with versions of OIIO < 2.4
7+
8+
19
10.4.5.0 (relative to 10.4.4.0)
210
========
311

src/IECoreImage/ImageReader.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,8 +166,10 @@ class ImageReader::Implementation
166166
if( !tiled )
167167
{
168168
return input->read_native_deep_scanlines(
169+
#if OIIO_VERSION >= 20400
169170
0, // subimage
170171
0, // miplevel
172+
#endif
171173
spec->height + spec->y - 1,
172174
spec->height + spec->y,
173175
0, // first deep sample
@@ -188,8 +190,10 @@ class ImageReader::Implementation
188190
// are doing things correctly, and this is an OIIO bug. For the moment, just read in
189191
// the whole image starting from the origin, because this doesn't crash.
190192
return input->read_native_deep_tiles(
193+
#if OIIO_VERSION >= 20400
191194
0, // subimage
192195
0, // miplevel
196+
#endif
193197
spec->x, spec->width + spec->x,
194198
spec->y, spec->height + spec->y,
195199
0, 1, // first deep sample

0 commit comments

Comments
 (0)