user350814
user350814

Reputation:

Library to generate Images with pixels

I'm looking for a Library that allows me to generate an Image via pixel information, in this style(dummyfunction):

/*
 coord_x = X coordinate
 coord_y = Y coordinate
 red     = red part of RGB
 green   = green part of RGB
 blue    = blue part of RGB
*/
setPixel(int coord_x, int coord_y, int red, int green, int blue)

Is there such a Function? I've searched libpng, but it doesn't appear to allow to set pixels manually (might be wrong, though)...

Prefered formats for output would be PNG, GIF would be acceptable, JPG will probably not work (due to compression and lack of transparency as in PNG and GIF).

Upvotes: 2

Views: 3508

Answers (4)

Stuart Golodetz
Stuart Golodetz

Reputation: 20656

You could look at ITK (http://www.itk.org). Its primary use is for medical image processing, but it works just as well for processing other images. It's also portable (built using CMake).

Upvotes: 0

usta
usta

Reputation: 6869

I'd use Boost.GIL.

Upvotes: 1

nonopolarity
nonopolarity

Reputation: 151206

a strong and powerful library is Imagick:

Use MagickWand to convert, compose, and edit images from the C language. There is also the low-level MagickCore library for wizard-level developers.

http://www.imagemagick.org/script/api.php?ImageMagick=2m69higs264080492m8ttkndb5#c

Upvotes: 2

user325117
user325117

Reputation:

If you're on Windows, you could use GDI+.

Upvotes: 1

Related Questions