Just use the convert command from ImageMagick instead of gm convert