I had a similar problem with the libpng when I tried to use the convert command with png files.
At first I tried updating imagemagick, but for the current version of brew, I had no updates. Updating brew and then updating ImageMagick solved the problem.
brew update brew upgrade imagemagick
Cagri sarigoz
source share