#111189GD and ImageMagick sharpen on two different scales
Description
Problem
Since #111103, GraphicsCanvas::sharpen() sharpens on one even scale: a strength falls into ten steps of 10, step n sharpens like -unsharp 1x2+(n*0.25)+0, and step 1 is what GFX/sharpen applies to scaled-down images.
GraphicalFunctions::v5_sharpen() still returns -sharpen 1x2 to -sharpen 5x5 from im5fx_sharpenSteps. That is another scale: on scaled-down photos its step 1 sharpens about three times as strongly as step 1 of GD, and it does not grow steadily, step 4 sharpens less than step 3 and step 7 less than step 6.
The GD factor of 1/16 per step also sharpens 5 to 15 percent less than -unsharp of the same step, measured on four photos of the core scaled down to 400 pixels. ImageMagick and GraphicsMagick render the same there.
Expected
GD, ImageMagick and GraphicsMagick sharpen alike at every step:
v5_sharpen()returns-unsharp 1x2+(n*0.25)+0for step n, andim5fx_sharpenStepsholds those-unsharpgeometries.- GD steps by 9/128 instead of 1/16. That matches
-unsharpmore closely and is still a binary fraction, so every kernel adds up to exactly 1 and flat areas keep their value. A factor such as 0.07 does not: GD truncates, and flat areas lose a grey level at several steps.
v5_sharpen() is public and returns another command afterwards, so the change is breaking on main.
Reviews 1
History 14
-
Gerrit Code Review pushed patch set 1 for main to change 96971 status
NewUnder Review <span data-processor="relativetime" data-value="2026-10-21T12:05:51+00:00" > 10/21/26, 12:05 </span> -
Gerrit Code Review pushed patch set 2 for main to change 96971 <span data-processor="relativetime" data-value="2026-10-21T17:33:53+00:00" > 10/21/26, 17:33 </span>
-
Gerrit Code Review pushed patch set 3 for main to change 96971 <span data-processor="relativetime" data-value="2026-10-22T18:42:34+00:00" > 10/22/26, 18:42 </span>
-
Benjamin Kott commented and changed status
Under ReviewResolved done0 %100 % <span data-processor="relativetime" data-value="2026-10-23T08:45:13+00:00" > 10/23/26, 08:45 </span>
Applied in changeset commit:feb04d86b337c17c635172541268ff230935225a.