ImageMagick and GraphicsMagick as a duplex stream