| 652 | |
| 653 | |
| 654 | void |
| 655 | ImageBuf::copy_from (const ImageBuf &src) |
| 656 | { |
| 657 | if (this == &src) |
| 658 | return; |
| 659 | const ImageBufImpl *srcimpl (src.impl()); |
| 660 | srcimpl->validate_pixels (); |
| 661 | const ImageSpec &srcspec (srcimpl->spec()); |
| 662 | ImageBufImpl *impl (this->impl()); |
| 663 | const ImageSpec &spec (impl->spec()); |
| 664 | ASSERT (spec.width == srcspec.width && |
| 665 | spec.height == srcspec.height && |
| 666 | spec.depth == srcspec.depth && |
| 667 | spec.nchannels == srcspec.nchannels); |
| 668 | impl->realloc (); |
| 669 | if (spec.deep) |
| 670 | impl->m_deepdata = srcimpl->m_deepdata; |
| 671 | else |
| 672 | src.get_pixels (src.xbegin(), src.xend(), src.ybegin(), src.yend(), |
| 673 | src.zbegin(), src.zend(), spec.format, |
| 674 | impl->m_localpixels); |
| 675 | } |
| 676 | |
| 677 | |
| 678 |
nothing calls this directly
no test coverage detected