(self, img, loc)
| 102 | return TransformFactory(name=str(self), apply_image=lambda img: self._impl(img, l)) |
| 103 | |
| 104 | def _impl(self, img, loc): |
| 105 | x0, y0 = loc |
| 106 | img_shape = img.shape[:2] |
| 107 | background = self.background_filler.fill( |
| 108 | self.background_shape, img) |
| 109 | background[y0:y0 + img_shape[0], x0:x0 + img_shape[1]] = img |
| 110 | return background |