ImageMagick and GraphicsMagick produce different results so you should really use convert instead of gm.
Your output image is still CMYK and the colors are negated in Windows photo viewer:
Your output image is still CMYK and the colors are negated in Windows photo viewer:
C:\Test\jpg>identify i.jpg
i.jpg JPEG 675x286 675x286+0+0 8-bit CMYK 185KB 0.000u 0:00.003