E
E
etc2011-03-11 20:27:32
C++ / C#
etc, 2011-03-11 20:27:32

Working with images in C++?

Welcome all! I need advice on working with images in C++. There is an image, let's say 100x100. I need to get a two-dimensional array, each cell of which will contain the brightness of a pixel (in my case, R = G = B = brightness, from 0 to 255). After I perform smoothing according to the given algorithm, I need to write the result to the output file.
Actually, in which direction to dig? Apparently, I need the simplest library for working with images, which will allow me to get the brightness of a pixel, create a new image and write it to a separate file.
PS I plan to get by with a console application compiled with MinGW. But if there are much simpler ways to accomplish my task, please note.

Answer the question

In order to leave comments, you need to log in

5 answer(s)
D
Dzuba, 2011-03-11
@etc

Look towards libgd .
By the way, habratopic: habrahabr.ru/blogs/cpp/52775/

E
etc, 2011-03-12
@etc

Comrade svnbt suggested the CImg library on Twitter, it comes in the form of a single .h file, that's what you need. Thank you all for your help, thank you all :)

Y
Yakhnev, 2011-03-11
@Yakhnev

habrahabr.ru/qa/4808/

V
Vladimir, 2011-03-11
@noonv

OpenCV - maybe redundant for this task, but with a huge reserve for the future :)
a series of lessons on OpenCV

I
impass, 2011-03-12
@impass

I recommend the ImageMagick library .
For C++, it has an OOP interface called Magick++ . I really only had experience with the classic MagickWand , although I was writing a C++ application.
In any case, the library has a lot of possibilities, there are builds for different platforms, it is simple and pleasant to use.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question