refactor graphicsmagick parser (dimension)