You install ImageMagick, it most likely depends on Ghostscript.
You use something else than ImageMagick, say, to resize an uploaded image, and the moment it sees a color-managed image, it will produce something that looks like puke.
I had to do a very custom build of ImageMagick to get rid of dependencies on libgs and libX11. It wasn't fun.
ImageMagick was problematic for so long by pulling everything and the kitchen sink as dependencies. It's just not something you'd like to replace because it's got nice features and... works. It feels absurd but right now, if you have a very narrow use case (like just resizing), it may be better to make an LLM create an alternative, in a safer language, with validated core components, tested on a large number of samples.
Another alternative is GraphicsMagick (http://www.graphicsmagick.org/) which aims to be API and utility compatible with ImageMagick, but spends most of its development effort on fuzzing, verification, etc. It's a more secure alternative to ImageMagick for those who've developed something significant that depends on ImageMagick.
I was looking through the PPDs a Brother printer installed for Linux (trying to get it working on FreeBSD), it had a pre-built ghostscript binary in there that hadn't been updated in god knows how long. I wonder if printing a PDF with an embedded font or something could trigger that.
You use something else than ImageMagick, say, to resize an uploaded image, and the moment it sees a color-managed image, it will produce something that looks like puke.
I had to do a very custom build of ImageMagick to get rid of dependencies on libgs and libX11. It wasn't fun.