Skip to content

Commit

Permalink
respect gradient:bounding-box define (ImageMagick/ImageMagick#7143)
Browse files Browse the repository at this point in the history
  • Loading branch information
Cristy committed Mar 9, 2024
1 parent c59d29a commit 3328513
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions magick/draw.c
Original file line number Diff line number Diff line change
Expand Up @@ -2027,7 +2027,7 @@ MagickExport MagickBooleanType DrawGradientImage(Image *image,
image_view=AcquireAuthenticCacheView(image,exception);
#if defined(MAGICKCORE_OPENMP_SUPPORT)
#pragma omp parallel for schedule(static) shared(status) \
magick_number_threads(image,image,bounding_box.height-bounding_box.y,2)
magick_number_threads(image,image,(size_t) (bounding_box.height-bounding_box.y+1),1)
#endif
for (y=bounding_box.y; y < (ssize_t) bounding_box.height; y++)
{
Expand All @@ -2042,19 +2042,18 @@ MagickExport MagickBooleanType DrawGradientImage(Image *image,
IndexPacket
*magick_restrict indexes;

ssize_t
i,
x;

PixelPacket
*magick_restrict q;

ssize_t
j;
i,
j,
x;

if (status == MagickFalse)
continue;
q=GetCacheViewAuthenticPixels(image_view,0,y,image->columns,1,exception);
q=GetCacheViewAuthenticPixels(image_view,bounding_box.x,y,(size_t)
(bounding_box.width-bounding_box.x+1),1,exception);
if (q == (PixelPacket *) NULL)
{
status=MagickFalse;
Expand Down

0 comments on commit 3328513

Please sign in to comment.