diff options
Diffstat (limited to 'source/blender/blenkernel/intern/tracking.c')
-rw-r--r-- | source/blender/blenkernel/intern/tracking.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/tracking.c b/source/blender/blenkernel/intern/tracking.c index b27a065730b..f1100a1ae08 100644 --- a/source/blender/blenkernel/intern/tracking.c +++ b/source/blender/blenkernel/intern/tracking.c @@ -1193,7 +1193,11 @@ static ImBuf *get_area_imbuf(ImBuf *ibuf, MovieTrackingTrack *track, MovieTracki x1 = x - (int)(w * (-min[0] / (max[0] - min[0]))); y1 = y - (int)(h * (-min[1] / (max[1] - min[1]))); - tmpibuf = IMB_allocImBuf(w + margin * 2, h + margin * 2, 32, IB_rect); + if (ibuf->rect_float) + tmpibuf = IMB_allocImBuf(w + margin * 2, h + margin * 2, 32, IB_rectfloat); + else + tmpibuf = IMB_allocImBuf(w + margin * 2, h + margin * 2, 32, IB_rect); + IMB_rectcpy(tmpibuf, ibuf, 0, 0, x1 - margin, y1 - margin, w + margin * 2, h + margin * 2); if (pos != NULL) { |