support imagemagick_gm

cleanup extra logic and include support for gm