开发者

Library to generate Images with pixels

开发者 https://www.devze.com 2023-01-24 06:30 出处:网络
I\'m looking for a Library that allows me to generate an Image via pixel information, in this style(dummyfunction):

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, bu开发者_JAVA百科t 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).


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


I'd use Boost.GIL.


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


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).

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号