Simple C image library? [closed] - c

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
What's the simplest C image library for loading and saving? I just want a 2D array to test some algorithms, and built-in functions are not needed.

All these libraries are way too complicated for me. In your place I'd grit my teeth, define an abstraction for a dynamic two-dimensional array, and I'd read and write plain ASCII PNM format.

You could try stb_image for reading and stb_image_write for writing. These are very small libraries.
http://nothings.org/
https://github.com/nothings/stb
Link to my question on gamedev I've got to know about this site:
https://gamedev.stackexchange.com/questions/9083/library-to-load-images-into-textures-linux-c-and-opengl

I think FreeImage is the best one out there:
http://freeimage.sourceforge.net/

Simple Direct-media Layer (SDL) with SDL_image

You could also just read and write raw image RGB values to a binary file, if that is really all you need, and if you know the image size ahead of time.

You definitely want to look at the imagemagik c connector api. It is very easy to get going, and the linked page has some nice code samples.
And there is always the ubiquitous GD library. It is not hard to use either.

I like gd. Real popular.
link text

Related

drawing circle, line, arc etc. using c [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed last year.
Improve this question
So our teacher taught us to draw circles lines using c in turboc++, and my issue is, this compiler sucks, so I wanted to use some normal compiler or code editor, and I googled it, but those programs on websites which I found, use graphics.h for drawing circle, but my compiler is showing an error named no such file or directory. The same issue is seen when I use an online compiler.
So plz someone guide me where can I find some good material related to basic computer graphics whose c code does not need turboc++. It can be a book or website or videos on youtube.
Thanks in advance.
There is no standard graphics library in C. It's all third party. So you will never be able to write graphics code that's completely portable.
If you're using Linux, it's possible to use libgraph to enable the use of graphics.h. I found a question on askubuntu that covers this: How do I use graphics.h in Ubuntu?
If you're using Windows, it seems to be possible to use WinBGIm to use graphics.h. Geeks for geeks has instructions for how to use it with CodeBlocks https://www.geeksforgeeks.org/include-graphics-h-codeblocks/
I do not know how good these two options are, but they might be worth trying out. That will at least remove the Turbo dependency.

Looking for auto C code generation tools [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
I am working on embedded project that requires almost same kind of code template for each new implementation.
Instead of doing manual code, I am thinking to automate the code generation process.
So that I only need to provide input data to the tool in some format (could be any input format) and it generated C code according to it.
Open source would be the first choice but proprietary tools are also acceptable.
I already searched for Eclipse Modeling plugins Acceleo and Actifsource but didn't find them suitable for Embedded C code generation.
And I don't want to use heavy solution like MATLAB and LabVIEW just for code generation.
C code generation from UML models is possible with tools such as:
IBM Rational Rhapsody
Open source Eclipse plugin Topcased
There are many variants of C code generation:
function pointers (parent function do the same code exept a little variant)
inline functions + macro (parameters of macro could define a new functions)
systems like make, cmake, autotools (you write an input-file wich is modified at precompiling)
Tell more if you want to get more detailed answer.

Are there any non-GPL libraries for decoding MPEG-4? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I'm looking for a non-(L)GPL library to decode MPEG-4 stream.
I don't mind it being commercial.
The price is as not important as code quality and support.
Any suggestions are welcome.
Your own experience is even better.
You can only try Commercial ones:
Elcard : http://www.elecard.com/en/download/products.html
Ligos : http://ligos.com/index.php/home/products/mediarig_encoder/
MainConcept : http://www.mainconcept.com/products/sdks/video.html
Rohzet (carbon coder) : http://www.rhozet.com/products.html
Flip factory : http://www.telestream.net/flipfactory/overview.htm
All of these are practically well used in broadcast productions and are of good grade.
The order doesn't reflect any preference. Most of them are either usable as SDK or independent application with dongle or otherwise.
However, your fear is rather fundamental, and fleeing DLL might not be possible to be prevented trivially.
I was under the impression that CoreAVC is by far the best performant H.264 codec. http://corecodec.com/products/coreavc
Depends what you mean by non-GPL. There are many that are LGPL (thus non-viral).
Like the most popular one libavcodec which is part of FFmpeg.
By contrast x264, which is GPL-ed, is only needed for encoding, not for decoding.
FFmpeg makes it clear how to compile it in non-viral way.
Are you going to require your own videocard drivers as well, or what happens if I use a video driver that does whatever I want with what your decoder sends me? Are you going to somehow force users to use only your video cables as well, and somehow destroy any video camera in the vicinity, and wipe clean the users' memories of what they see? Such madness! So what if you use a GPL library? You cannot lock down the Universe.

Good collection of libraries for C? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
I'm looking for a good collection of libraries for ANSI-C, stuff for handling vectors, hash maps, binary tress, string processing, etc.
Try glib? It's used by GTK+, but it can also be used on other platforms. You can also try Apache APR, which is used by the Apache web server and some of their other C components, or NSPR, which is used by Mozilla projects in C.
gnu's glib collection. furthermore, it's portable for many platforms.
You might also find this question useful:
Container Class / Library for C
As well, this book might be interesting:
Mastering Algorithms with C
The full source code is on the CD and it has code for most of those data structures and algorithms.
check also gnulib's data structures. This library also provides many other features as well as portable layer to ANSI/non-ANSI compilers and POSIX/non-POSIX systems.
checkout http://www.invincibleideas.com/library.asp
GLUT OpenGL I can recommend for very flexible C (graphics) development

C Image Library [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
Can anyone recommend a decent C image library?
I'm after loaders for bmp, gif, jpg, png and tga.
I want to use this for programming my Sony Playstation Portable, so opensource would be very handy.
After some googleing I've found FreeImage and CImg, but both feel rather heavy, and CImg is C++ not C.
If you control the images you're loading, the lightest loader I know is Sean Barrett's awesome stb_image.c (direct link to single file source code!).
There are also other very worthwhile libraries on Sean's site such as a tiny TrueType rasterizer and Vorbis decompressor, btw.
If you need OpenGL image loading that uses stb_image, I'll humbly point you to SOILex...
ImageMagick has a C API to connect to its libraries. There's also what they call a "low-level interface" between C and the ImageMagick libraries.
I used FreeImage for PSP games in the past, but it was for pre-processing the data rather than in-game.
DevIL is often recommended. Whether or not it does what you want, I don't know.
I will second Thomas Owens's ImageMagick suggestion. It is mind-boggling just how comprehensive the library is, and how much time it saves you in the end.
Here is some code I wrote for handling images. It is in c++ ( not c ) but you should be able to easily extract the BMP and GIF load code. It's licensed LGPL.
I use the libpng and jpeglib for decompressing those formats.
For one of my project, I am using CImg Library. It's very useful to start with. Moreover, they also have a decent documentations.

Resources