C/C++ library for manipulating images

Asked

Viewed 2,922 times

0

I would like to know which library to use, which is easy to install for both Windows and Linux, to manipulate images ( png, jpg, etc) in C/C++ ?

I would like to open and save it in an array to work with this data as well as show it in a window after( display the image).

You just have to do it. You don’t have to be an Opencv of life.

  • To display an image in a window what you want is not an "image manipulation" library, but a "graphical interface" library. No image manipulation library has functions to open a window and display images; all graphical interface libraries (SDL, IUP, GTK+, TK, FLTK, Fox Toolkit, Qt, wxWidgets, etc.) do so. Graphic format libraries (libjpeg, libpng, libtiff, etc.) only read and write dot arrays in their respective formats.

  • i use stb_image with Opengl

2 answers

1

The ideal would be to work directly with libpng or libjpeg. It’s true that they’re libraries that, at first glance, look complex and esoteric, but they give you what you are and that’s it - open an image of their format and give you a pointer to an array with the image data. An example file reading with libpng: http://zarb.org/~gc/html/libpng.html

If you do not want to work with the low level of the various image load libraries there is no way but to use something that wraps them in an abstraction layer, such as ITK, Opencv or VTK (the latter also loads image display capabilities). SDL would also be a good alternative and is simpler to use than the ones I quoted above.

The ease of installation depends on whether or not you know how to use Cmake. If you know how to use Cmake every c/c++ library becomes easy to use, simply by the . h directory and the pro path. lib in Cmake according to his rules. If you do not know how to use Cmake, you will have problems.

0

Browser other questions tagged

You are not signed in. Login or sign up in order to post.