Issue Bug Resolved

#111103GIFBUILDER sharpen gets weaker with a higher strength

Benjamin Kott 10/17/26, 01:40 updated 10/21/26, 09:40

Description

Problem

Since GIFBUILDER draws with GraphicsCanvas instead of ImageMagick, the sharpen value of an EFFECT object and of niceText.sharpen works the wrong way round: sharpen = 10 sharpens the image strongly, sharpen = 90 barely at all. With ImageMagick, GraphicalFunctions::v5_sharpen() sharpened more the higher the value, from -sharpen 1x2 to -sharpen 5x5. Even the weakest step is about three times as strong as ImageMagick’s.

Steps to reproduce

  1. Render a GIFBUILDER image with an IMAGE object and an EFFECT object with value = sharpen = 10.
  2. Render the same image with value = sharpen = 90.
  3. Compare both: the image with 10 is sharpened much more than the one with 90.

Cause

GraphicsCanvas::sharpen() builds a 3×3 kernel with the centre 8 + v and divides by the sum of the kernel, which is v. A higher strength raises the divisor along with the centre, so the kernel gets weaker; at the lowest strength the divisor is 1 and the kernel is a full laplacian sharpen

Reviews 2

History 18

  1. Benjamin Kott commented and changed status Under Review Resolved done 0 % 100 % <span data-processor="relativetime" data-value="2026-10-21T09:40:12+00:00" > 10/21/26, 09:40 </span>

    Applied in changeset commit:2d4cbb28fca75d193611bdd9027c4582b774b322.