ImageMagick vs. Cairo on Rasterization Vector Graphics

I am working on a project that requires rasterizing drawings into image files. I have already worked with GDI +. Wanting to create a portable solution, I also study other solutions and discovered two - cairo and imagemagick. I am new to both, but it seems that ImageMagick can do almost anything: drawing lines, arcs, circles, text, etc. Plus a lot of manipulation with bitmaps.

However, Cairo is referred to as a member of GDI + on websites. ImageMagick is never mentioned for this purpose.

I donโ€™t have time to invest in both libraries. I need to decide which one is worthy. I prefer ImageMagick as it seems a lot more powerful.

How do you feel about two graphic libraries?

+4
source share
1 answer

Cairo on its own cannot really affect the manipulation of bitmap images - at least in the sense that ImageMagick can. This, however, is a very powerful vector image library and can do almost everything GDI + can do, to the extent that it is practically suitable for DirectDraw 2D. It can also create and use bitmap images and directly supports PNG image format.

ImageMagick, on the other hand, is a raster image library. It focuses less on vector graphics than Cairo, and instead directly creates raster images of vector shapes. On the other hand, he also does a lot that Cairo cannot do initially, including rasterizing the text; IM also supports almost any image format known to man, and can import and export them with relative ease.

Use Cairo if you need to make scalable vector graphics.

Use ImageMagick if you use raster or raster formats.

+11
source

Source: https://habr.com/ru/post/1307102/


All Articles