Image::Magick Composite() and Gimp layer overlay difference
This is because Gimp 2.10 is doing the composition in "Linear light".
- 8-bit images are "gamma-corrected", so that more of the available values (0..255) are devoted to dark tones (middle grey is around 180 instead of 127).
- The alpha-composition formula applies to non-gamma values but has often been misused with gamma-corrected values. I assume this is the case with IM now as it was the case with Gimp prior to 2.10.
- In Gimp 2.10 this is done by default after removing the gamma correction, which is also called "Linear light".
You can ask Gimp to use the "legacy" (and incorrect) way by using the "legacy" blend modes. You switch to the legacy blend modes with the small selector at the end of the layer blend mode selector. When you use the legacy mode you get the same result as IM:
I'm not an IM expert so I cannot tell you how you can ask IM to behave properly. A possible trick could be to convert your images to gamma-less floating-point TIFF.