What were the patent-related reasons for temporarily removing GIF support in the GD library for PHP?

The patent-related reasons for temporarily removing GIF support in the GD library for PHP were due to Unisys holding a patent on the LZW compression algorithm used in GIF files. To avoid potential legal issues, GIF support was disabled in the GD library until the patent expired.

// To support GIF images in the GD library without infringing on any patents,
// you can use the Imagick library instead, which has built-in support for GIF images.

$image = new Imagick('image.gif');
$image->writeImage('output.gif');