Commit: a224bcbcfcff721368bcdea1fed3a5943da597e6 Author: Aditya Y Jeppu Date: Sun Aug 15 15:24:43 2021 +0530 Branches: soc-2021-vse-strip-thumbnails https://developer.blender.org/rBa224bcbcfcff721368bcdea1fed3a5943da597e6
Correct Fix for pixel errors in the first thumbanail for each strip. =================================================================== M source/blender/editors/space_sequencer/sequencer_draw.c M source/blender/imbuf/intern/rectop.c M source/blender/sequencer/intern/render.c =================================================================== diff --git a/source/blender/editors/space_sequencer/sequencer_draw.c b/source/blender/editors/space_sequencer/sequencer_draw.c index 04a38c2c3fd..79bd374e3cc 100644 --- a/source/blender/editors/space_sequencer/sequencer_draw.c +++ b/source/blender/editors/space_sequencer/sequencer_draw.c @@ -1402,7 +1402,7 @@ static void draw_seq_strip_thumbnail(View2D *v2d, cropx_min = (cut_off / pixelx) / (zoom_y / pixely); cropx_max = ((x2 - x1) / pixelx) / (zoom_y / pixely); - BLI_rcti_init(&crop, (int)(cropx_min), (int)image_x, 0, (int)(image_y)-1); + BLI_rcti_init(&crop, (int)(cropx_min), (int)cropx_max + 1, 0, (int)(image_y)-1); /* Get the image */ ibuf = SEQ_get_thumbnail(&context, seq, roundf(x1), &crop, clipped, false); diff --git a/source/blender/imbuf/intern/rectop.c b/source/blender/imbuf/intern/rectop.c index e3e21cf83ef..4b5d68b9c13 100644 --- a/source/blender/imbuf/intern/rectop.c +++ b/source/blender/imbuf/intern/rectop.c @@ -266,7 +266,7 @@ void IMB_rect_crop(ImBuf *ibuf, const rcti *crop) }; BLI_assert(size_dst[0] > 0 && size_dst[1] > 0); BLI_assert(crop->xmin >= 0 && crop->ymin >= 0); - BLI_assert(crop->xmax <= ibuf->x && crop->ymax <= ibuf->y); + BLI_assert(crop->xmax < ibuf->x && crop->ymax < ibuf->y); if ((size_dst[0] == ibuf->x) && (size_dst[1] == ibuf->y)) { return; diff --git a/source/blender/sequencer/intern/render.c b/source/blender/sequencer/intern/render.c index 7e43950edca..3006deb1748 100644 --- a/source/blender/sequencer/intern/render.c +++ b/source/blender/sequencer/intern/render.c @@ -2087,6 +2087,10 @@ ImBuf *SEQ_get_thumbnail(SeqRenderData *context, crop->xmin = 0; crop->ymin = 0; } + if (crop->xmax >= ibuf->x || crop->ymax >= ibuf->y) { + crop->xmax = ibuf->x - 1; + crop->ymax = ibuf->y - 1; + } IMB_rect_crop(temp, crop); if (temp != NULL) { IMB_freeImBuf(ibuf); _______________________________________________ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs