bool ImageOutputWrap::write_scanline (int y, int z, TypeDesc format, object &buffer, stride_t xstride) { const void *array = make_read_buffer (buffer, m_output->spec().scanline_bytes()); return m_output->write_scanline(y, z, format, array, xstride); }
bool ImageOutputWrap::write_tile (int x, int y, int z, TypeDesc format, object &buffer, stride_t xstride, stride_t ystride, stride_t zstride) { imagesize_t size = m_output->spec().tile_bytes(); const void *array = make_read_buffer(buffer, size); return m_output->write_tile(x, y, z, format, array, xstride, ystride, zstride); }
bool ImageOutputWrap::write_image (TypeDesc format, object &buffer, stride_t xstride, stride_t ystride, stride_t zstride) { imagesize_t size = m_output->spec().image_bytes(); const void *array = make_read_buffer (buffer, size); if (array) return m_output->write_image (format, array, xstride, ystride, zstride); return false; }
bool ImageOutputWrap::write_tiles (int xbegin, int xend, int ybegin, int yend, int zbegin, int zend, TypeDesc format, object &buffer, stride_t xstride, stride_t ystride, stride_t zstride) { imagesize_t size = m_output->spec().tile_bytes(); const void *array = make_read_buffer(buffer, size); return m_output->write_tiles (xbegin, xend, ybegin, yend, zbegin, zend, format, array, xstride, ystride, zstride); }
bool ImageOutputWrap::write_scanline (int y, int z, TypeDesc format, object &buffer, stride_t xstride) { bool native = (format == TypeDesc::UNKNOWN); imagesize_t size = native ? m_output->spec().scanline_bytes (native) : format.size() * m_output->spec().nchannels * m_output->spec().width; const void *array = make_read_buffer (buffer, size); ScopedGILRelease gil; return m_output->write_scanline(y, z, format, array, xstride); }
bool ImageOutputWrap::write_image (TypeDesc format, object &buffer, stride_t xstride, stride_t ystride, stride_t zstride) { bool native = (format == TypeDesc::UNKNOWN); imagesize_t size = native ? m_output->spec().image_bytes (native) : format.size() * m_output->spec().nchannels * m_output->spec().image_pixels(); const void *array = make_read_buffer (buffer, size); ScopedGILRelease gil; if (array) return m_output->write_image (format, array, xstride, ystride, zstride); return false; }
bool ImageOutputWrap::write_tiles (int xbegin, int xend, int ybegin, int yend, int zbegin, int zend, TypeDesc format, object &buffer, stride_t xstride, stride_t ystride, stride_t zstride) { bool native = (format == TypeDesc::UNKNOWN); imagesize_t size = native ? m_output->spec().tile_bytes (native) : format.size() * m_output->spec().nchannels * m_output->spec().tile_pixels(); const void *array = make_read_buffer(buffer, size); ScopedGILRelease gil; return m_output->write_tiles (xbegin, xend, ybegin, yend, zbegin, zend, format, array, xstride, ystride, zstride); }