| 1219 | |
| 1220 | |
| 1221 | bool |
| 1222 | ImageBuf::copy_pixels (const ImageBuf &src) |
| 1223 | { |
| 1224 | // compute overlap |
| 1225 | ROI myroi = get_roi(spec()); |
| 1226 | ROI roi = roi_intersection (myroi, get_roi(src.spec())); |
| 1227 | |
| 1228 | // If we aren't copying over all our pixels, zero out the pixels |
| 1229 | if (roi != myroi) |
| 1230 | ImageBufAlgo::zero (*this); |
| 1231 | |
| 1232 | OIIO_DISPATCH_TYPES2 ("copy_pixels", copy_pixels_2, |
| 1233 | spec().format, src.spec().format, *this, src, roi); |
| 1234 | return true; |
| 1235 | } |
| 1236 | |
| 1237 | |
| 1238 |
no test coverage detected