@@ -2321,16 +2321,16 @@ class OIIO_API ImageOutput {
23212321 return write_image (ispan);
23222322 }
23232323
2324- // / Write one scanline that include pixels (*,y,z ) from `data`, which is
2325- // / an `image_span` of un-typed bytes incorporating its bounded dimensions
2324+ // / Write one scanline that include pixels (*,y) from `data`, which is an
2325+ // / `image_span` of un-typed bytes incorporating its bounded dimensions
23262326 // / and strides. The data type is given explicity by the `format`
23272327 // / argument, and will be automatically converted to the type being stored
23282328 // / in the file.
23292329 // /
23302330 // / The image_span must have a width equal to a full scanline width,
23312331 // / and its height and depth must be 1.
23322332 // /
2333- // / @param y/z The y & z coordinates of the scanline.
2333+ // / @param y The y coordinate of the scanline.
23342334 // / @param format A TypeDesc describing the type of the pixel data
23352335 // / that `data`'s memory contains. Use `TypeUnknown`
23362336 // / to indicate that the data is already in the native
@@ -2340,34 +2340,32 @@ class OIIO_API ImageOutput {
23402340 // / dimension (channel, x, y, z).
23412341 // / @returns `true` upon success, or `false` upon failure.
23422342 // /
2343- virtual bool write_scanline (int y, int z, TypeDesc format,
2343+ virtual bool write_scanline (int y, TypeDesc format,
23442344 const image_span<const std::byte>& data);
23452345
23462346 // / A version of `write_scanline()` taking an `image_span<T>`, where the
23472347 // / type of the underlying data is `T`. This is a convenience wrapper
23482348 // / around the `write_scanline()` that takes an `image_span<const
23492349 // / std::byte>`.
2350- template <typename T>
2351- bool write_scanline (int y, int z, const image_span<T>& data)
2350+ template <typename T> bool write_scanline (int y, const image_span<T>& data)
23522351 {
23532352 // reduce to type + image_span<byte>
2354- return write_scanline (y, z, TypeDescFromC<T>::value (),
2353+ return write_scanline (y, TypeDescFromC<T>::value (),
23552354 as_image_span_bytes (data));
23562355 }
23572356
23582357 // / A version of `write_scanline()` taking a `cspan<T>`, which assumes
23592358 // / contiguous strides in all dimensions. This is a convenience wrapper
23602359 // / around the `write_scanline()` that takes an `image_span<const T>`.
2361- template <typename T> bool write_scanline (int y, int z, span<T> data)
2360+ template <typename T> bool write_scanline (int y, span<T> data)
23622361 {
23632362 // reduce to type + image_span<byte>
23642363 auto isize = m_spec.image_bytes (TypeDescFromC<T>::value ());
2365- return write_scanline (y, z,
2366- image_span<T>(data.data (), m_spec.nchannels ,
2367- m_spec.width , 1 , 1 ));
2364+ return write_scanline (y, image_span<T>(data.data (), m_spec.nchannels ,
2365+ m_spec.width , 1 , 1 ));
23682366 }
23692367
2370- // / Write multiple scanlines that include pixels (*,y,z ) for all `ybegin
2368+ // / Write multiple scanlines that include pixels (*,y) for all `ybegin
23712369 // / <= y < yend`, from `data`, which is an `image_span` of un-typed bytes
23722370 // / incorporating its bounded dimensions and strides. The data type is
23732371 // / given explicity by the `format` argument, and will be automatically
@@ -2380,7 +2378,6 @@ class OIIO_API ImageOutput {
23802378 // / and its height must be yend - ybegin.
23812379 // /
23822380 // / @param ybegin/yend The y range of the scanlines being passed.
2383- // / @param z The z coordinate of the scanline.
23842381 // / @param format A TypeDesc describing the type of the pixel data
23852382 // / that `data`'s memory contains. Use `TypeUnknown`
23862383 // / to indicate that the data is already in the native
@@ -2390,32 +2387,32 @@ class OIIO_API ImageOutput {
23902387 // / dimension (channel, x, y, z).
23912388 // / @returns `true` upon success, or `false` upon failure.
23922389 // /
2393- virtual bool write_scanlines (int ybegin, int yend, int z, TypeDesc format,
2390+ virtual bool write_scanlines (int ybegin, int yend, TypeDesc format,
23942391 const image_span<const std::byte>& data);
23952392
23962393 // / A version of `write_scanlines()` taking an `image_span<T>`, where the
23972394 // / type of the underlying data is `T`. This is a convenience wrapper
23982395 // / around the `write_scanlines()` that takes an `image_span<const
23992396 // / std::byte>`.
24002397 template <typename T>
2401- bool write_scanlines (int ybegin, int yend, int z, const image_span<T>& data)
2398+ bool write_scanlines (int ybegin, int yend, const image_span<T>& data)
24022399 {
24032400 // image_span<T>: reduces to type + byte_buffer
2404- return write_scanlines (ybegin, yend, z, TypeDescFromC<T>::value (),
2401+ return write_scanlines (ybegin, yend, TypeDescFromC<T>::value (),
24052402 data.as_image_span_bytes ());
24062403 }
24072404
24082405 // / A version of `write_scanlines()` taking a `cspan<T>`, which assumes
24092406 // / contiguous strides in all dimensions. This is a convenience wrapper
24102407 // / around the `write_scanlines()` that takes an `image_span<const T>`.
24112408 template <typename T>
2412- bool write_scanlines (int ybegin, int yend, int z, span<T> data)
2409+ bool write_scanlines (int ybegin, int yend, span<T> data)
24132410 {
24142411 auto ispan = image_span<T>(data.data (), m_spec.nchannels , m_spec.width ,
24152412 yend - ybegin, 1 );
24162413 OIIO_DASSERT (data.size_bytes () == ispan.size_bytes ()
24172414 && ispan.is_contiguous ());
2418- return write_scanlines (ybegin, yend, z, ispan);
2415+ return write_scanlines (ybegin, yend, ispan);
24192416 }
24202417
24212418
0 commit comments