I am writing some stuff for my work and need very simple graphics routines. Something like:
#include<simplegraphicslib.h>
main() {
GraphicsBuffer *mybuffer = makeGraphicsBuffer (100,100,colors16);
rect (mybuffer, 0,0,33,99, blue);
rect (mybuffer, 34,0,66,99, white);
rect (mybuffer, 67,0,99,99, red);
writeGraphicsBuffer (mybuffer, "frenchflag.png");
}
Any suggestions? Could also be useful for making pictures for birthday greetings.
Page 1 of 1
Any C/C++ Windows programmers here? Need a simple graphics library
#1
Posted 2009-November-25, 09:10
The world would be such a happy place, if only everyone played Acol :) --- TramTicket
#2
Posted 2009-November-25, 09:51
I haven't used these, but perhaps this helps:
http://pngwriter.sourceforge.net/ (as your example creates a png)
Or pick on on the other C/C++ libraries from here:
http://www.freeprogr...com/imglib.html
http://pngwriter.sourceforge.net/ (as your example creates a png)
Or pick on on the other C/C++ libraries from here:
http://www.freeprogr...com/imglib.html
#3
Posted 2009-November-25, 10:04
Thanks HotShot, pngwriter looks very easy to use.
Also thanks to Csaba for suggesting Gd, slightly more complex but still easy to use, supports more file formats. http://gnuwin32.sour...packages/gd.htm
Also thanks to Csaba for suggesting Gd, slightly more complex but still easy to use, supports more file formats. http://gnuwin32.sour...packages/gd.htm
The world would be such a happy place, if only everyone played Acol :) --- TramTicket
#4
Posted 2009-November-29, 04:32
gd is nifty.
I haven't done much graphics in C/C++, but XNA uses C# and has some very simple and very powerful stuff, and the IDE/compiler is free from Microsoft. I did some silly simple code for effecient circle packing with it for fun.

Took very little time to code. You can use image files like pngs, place them, scale them, rotate them, adjust their transparency, use antialiased fonts, etc. Pretty slick.
I made a little boids program with it too, just to familiarize myself with it
I haven't done much graphics in C/C++, but XNA uses C# and has some very simple and very powerful stuff, and the IDE/compiler is free from Microsoft. I did some silly simple code for effecient circle packing with it for fun.

Took very little time to code. You can use image files like pngs, place them, scale them, rotate them, adjust their transparency, use antialiased fonts, etc. Pretty slick.
I made a little boids program with it too, just to familiarize myself with it
Page 1 of 1

Help
