Looking for a fairly simple 2D graphics 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 8 years ago.
Improve this question
Ideally, I want a library that is similar to the primitive Java2D or Quartz stuff - e.g. setFill, setStroke, moveToPoint, lineToPoint, quadCurveToPoint, fillPath, strokePath, etc. Rotation and scaling of paths would be nice, but not essential. Drawing strings with a proportional font would also be nice. Open source, free as in speech, and free as in beer would be great!
This has to run on an embedded ARM7 with a small color LCD panel. No hardware graphics support. Memory very tight, 20 kbyte RAM and 256 kbyte flash.
Any suggestions?

Take a look at SDL_draw. This library draws on an SDL surface, but you should be able to easily adapt it to draw on the screen of your embedded device. The license is GPL, not sure if that works for you.

I've used the Cairo graphics library in an embedded device. We weren't too worried about memory though.

I don't know how it compares to where you come from, but allegro (mostly for games) is free, easy, and pretty well-supported:
http://www.talula.demon.co.uk/allegro/
Edit: I missed the embedded part. I doubt you want allegro then. Sorry.

openCV might be worth a look. It's more designed for manipulating and diagnosing images rather than to draw them yourself from scratch, but it's open-source, and fairly easy to use.
It's quite fast, so an extra point for embedded systems.

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.

Graphic API for embedded system [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 5 years ago.
Improve this question
I'm looking for a graphic API for embedded systems. With "graphic", I mean an API which is able to draw lines, fill areas, blit bitmaps, etc. I need something that is written in pure C (no C++).
With "embedded systems", I'm thinking of small systems where Linux is too big to run. So I would appreciate a library which is not too concerned with file systems, and OS-level access, but just exposes the graphic primitives with a C interface, and draws in memory buffers.
Any suggestion?
Swell Software, offers C/PEG.
Here's an excerpt from the C/PEG product page:
C/PEG is a complete graphics solution for embedded developers written entirely in ANSI C. C/PEG not only provides optimized graphics primitives, text and bitmap drawing; it also supports higher level graphic objects to give the developer a full tool set for rapid application development
We've used EasyGui - http://www.easygui.com/ - for the start of a project (it's currently on hold).
From the bit I've done it seems quite good. You design up the UI on a PC then generate the C code which makes it all happen.
One thing I like is that if you structure your app properly the code that runs the UI can be separate to the actual UI - ie it could be reused on a different screen resolution/colours/etc. We've made up a modular system where we can reuse bits in different projects as long as we follow the appropriate conventions for button numbers, etc

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.

JPEG or other lossy image compression library needed [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 3 years ago.
Improve this question
I've incorporated LIBPNG and ZLIB into my C software for a microcontroller project due to their nicely liberal license which permits such use without requiring me to disclose any of my code (it's very similar to BSD/MIT/APACHE, but with no attribution requirement).
I'd like to look at using lossy image compression to save memory. The JPEG code I've found is either GPL, LGPL, or not C. I cannot use LGPL, because that still requires me to make it possible for users to replace the library with a newer or different version, which is not possible for this project.
I'm hoping you know of a suitable lossy image compression library. It doesn't have to be JPEG (I control both encoding and decoding) but it does have to be C, and at most BSD licensed or similar (attribution is fine).
-Adam
Try IJG (at ijg.org). It's high-quality JPEG code, written in C, with a BSD-style license. We've used it where I work, and are happy with it.
libjpeg ILJ at is C source and liberally licensed.
http://www.ijg.org/
"We are releasing this software for both noncommercial and commercial use.
Companies are welcome to use it as the basis for JPEG-related products.
We do not ask a royalty, although we do ask for an acknowledgement in
product literature ..."
Mike
+1 on the Independent JPEG Group library.
It's in C
Highly portable
Small footprint
Liberally licensed
Highly regarded
Widely used
Stable (the last release was over 10 years ago )
Both Firefox and IE use IJG code for JPEG browsers. You can't get much better than that.

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