0

I've tried playing with Magick++ and drawing few simple primitives:

Magick::InitializeMagick(nullptr);
Image image(Geometry(1900,1200), Color("white"));
image.strokeColor("red");
image.strokeWidth(10);
image.draw(DrawableCircle(100,100,50,100));
image.draw(DrawableRectangle(200,200,270,170));
image.write("test.eps");

And those primitives do not seem to be vectorized. Checking the .eps file in notepad shows, that after prolog it uses DisplayImage procedure, but doesn't contain primitives. I know ImageMagick supports reading postscript, but does it support saving to it with actual vectorized primitives, or does it do some type of conversion to an image which is not vectorized at all? Couldn't find information about this anywhere.

9
  • 1
    I'm no expert with ImageMagick, but I think it's rasterizing the vectors to the pixmap backingstore. Commented Mar 19 at 18:51
  • 1
    My understanding (and I may be mistaken) is that it always rasterizes. Commented Mar 19 at 20:33
  • 1
    You can draw vectors, but when saved to PDF they will be vectorized Commented Mar 19 at 22:06
  • 2
    @tetektoza No I meant that Imagemagick can draw using vector tools, but when saving to PDF output the PDF only saves as a raster image embedded in a vector shell. So all vector data is rasterized and you cannot edit the original vectors that were created before it outputs to PDF. See usage.imagemagick.org/draw/#paths Commented Mar 20 at 0:38
  • 1
    It uses vector drawing commands, but when saving, it is rasterized. You might possibly install something like potrace and get a vector output such as SVG. I am not an expert on vector files. Commented Mar 20 at 16:05

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.