GD is normally compiled with PHP, it'd be able to be used instantly when the setting is available, you'll just need to tell the UBB to use it.
ImageMagick however you'll need to tell the UBB where the convert and mogrify files are located once it's installed.