Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a book, tool, software library, tutorial or other off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
I've been looking around for a simple and small yet robust and fast (not comprehensive!) image library for C++ (C would suffice, if no C++ version is available).
Main features I'm looking for are:
Free (opensource is a plus)
Built for speed
No huge functional bloat (like ImageMagik, which is truly comprehensive but is a mammoth)
Tiny memory footprint
Only supports the absolute minimum of functions like load/save, resize, convert between formats. Nothing fancy
Error recovery for "broken" files (unlike stb_image.c, which has pretty poor error recovery)
MSVC and gcc friendly (I used CxImage for a number of years but with the latest version I'm having problems with MSVC 2010 and it would seem that active development and support for it has died out by now, so I'm about to drop it)
Should support popular modern formats, like JPEG2000, either directly or via a use of general libraries like libpng
Don't care if it's DirectX or OpenGL as I don't plan on using it to display the images - only to file-process them for a web site
Having support for both static and dynamic linking is a plus
Threading support is a huge plus
Libraries I looked at and dismissed for one reason or another:
CxImage (no active development on it anymore)
ImageMagik - too huge (and slow)
stb_image.c - bad error handling, doesn't support enough image formats
DevIL (havn't dismissed yet, but haven't looked at it much either - just learnt of it a few minutes ago on a similar post on SO) - based on it's size and feature set it looks very promising for what I need though
FreeImage (same as DevIL - will take a look at it shortly but it's a bit big in size to my taste)
SOIL (same as stb_image.c)
TimThumb - it's a PHP, not a C/C++
In short I just want something as tiny as possible and as fast as possible at the expense of just having the absolute bare minimum of functionality but I'm yet to find a suitable candidate thus far.
Any suggestions from this community, please? But keep in mind the constraints I listed above - I don't think it's OK to throw an answer of a form "have you tried X?" where "X" doesn't meet half of my needs :)
Edit: Looking a bit more into DevIL it would seem it could be what I need. It's light, tiny, robust. Now I just need to make sure it performs.
Oh, and CImage (I forgot to mention it in the list) - didn't like it's performance (though I have to admit that the idea of template-only implementation is cute, to say the least)
I strongly suggest you to write a little library around libpng and jpeglib (and every other low-level library for the formats you need to support). It is not that hard and you can code all the features you require.
As an alternative, you can use some of the good c++ wrappers that already exists for that libraries. Here are some examples:
png++
JPEGReader/JPEGWriter
Look at CImg library, it's just one single header file
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
I am currently writing code in vs2012 which I want to compile in Linux. I want to serialise and save progress to a file and want that save file to be accessible on a 32-bit and 64-bit architecture, and both Windows and Linux.
I do not want to use any serialization libraries.
To achieve this I want to have functions which can convert and retrieve types, namely float, double, int32 and int64 (signed and unsigned) to fixed length and portable primitives for storage and retrieval in a binary file. My understanding is that bool and char types are specified in the standard and therefore already portable.
Performance is not critical but size is, so ASCII is not a viable solution here. I do not mind losing some precision if, for example, a platform uses a bit length larger than the fixed length I have specified, or vice versa.
As I am a newb too much talk of endianness, IEEE, etc. will confuse and irritate me.
I am particularly interested in a library that will do these conversions for me out of the box, but will consider rolling my own if that is the only way of achieving this.
FYI I don't want serialization libraries because boost doesn't work with smart pointers, cereal doesn't work with VS2012, and that Microsoft one doesn't work in Linux. If I'm going to have to doodle around to get these things to work I figure I might as well just do it myself.
Any ideas?
Edit: as I have now been schooled on the c++11 compatibility of the boost serialization library I will gladly settle for that solution.
#ausairman Boost Serialization very much does work with smart pointers:
boost serialize and std::shared_ptr
#include <boost/serialization/shared_ptr.hpp>
The samples (http://www.boost.org/doc/libs/1_49_0/libs/serialization/doc/tutorial.html#examples) show this. Also, the example makes it look like aliasing and cycles are taken care of by default.
Since you mention straightup that endianness and other portability concerns confuse you, I very heartily suggest you do not write this yourself (unless it is purely with the goal of learning).
If you are interested in something that is not platform dependent and will store your values in memory with the same format that you wish to serialize, consider Cap'n Proto, which is written by the same author as Google's Protobuffers 2.0.
I am not sure whether smart pointers are used, and you might have to rewrite your objects to be backed by the Cap'n proto structs instead of primitive values, but this seems closest to what you want.
http://kentonv.github.io/capnproto/
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
What visualization open sources or free software libraries are available for the Fortran programming language? Are there any similar to MatPlotLib for Python, for Fortran?
If not, most scientists require visualization not only to generate some outputs but also to investigate data trends, which is missing in Fortran although its speed in computation is well-known.
Note:
This question is intended to discover available, or planned to be available, graphical libraries for Fortran. It is clearly not going to compare different packages among different programming languages.
The flexibility, quality of outputs, interactivity, multi-dimensionality, free/open source etc are of factors to be discovered.
Just to make this list, a bit more complete ...
PLPLOT
GINO Suite
Winteracter
NCAR (outdated)
There is also gtk-fortran.
gtk-fortran offers also an interface to PLplot (>=5.13 in the GTK 3 branch).
I think there are some libraries available, which allow you to do directly some rendering of data from Fortran, however nothing like MatPlotLib, as far as I know.
Edit: Here is a short link collection:
http://www.astro.caltech.edu/~tjp/pgplot/
http://sourceforge.net/projects/gnuplotfortran/
http://www.mps.mpg.de/dislin/
http://www.vigyan.com/desl/FLAVOR.HTM (maybe not exactly matching here)
But the main point of the typical Fortran application is not the visualization of the data, but its generation. Typically you produce some output file, which can then be read by gnuplot or some other visualization tool. A common data container format is for example HDF5.
If there is still some need for direct visualization from within the Fortran application, you can use the ISO_C_Binding to interface with any C-Library, which should provide you with plentiful options. Still for these cases it is likely, that you will need to generate some wrapping layer around the C-API to provide an convenient usage in the Fortran application.
Free: Mjograph (2d plots only) and Veusz (2d and 3d plots)
Perhaps you can generate csv or simple space-delimited files with your Python/Compiled-Fortran code, and process using 2d plotting software like Mjograph and/or 2d/3d software like Veusz. Mjograph is only available via Mac and/or Java platform. Veusz is scriptable with Python, it was built using Python with Qt & Numpy, in fact the save file is just a plain Python script, and is comparable to gnuplot (at least in terms of ease of use). The tutorial with veusz clearly shows what the capabilities are. I like that it starts you off with the GUI, but you can wean off to pure scripting afterwards.
Mjograph: http://www.ochiailab.dnj.ynu.ac.jp/mjograph/
Veusz: https://veusz.github.io/
Veusz seems a little more natural compared to dumping data into Matlab or Mathematica. At least if you are used to pushing python and Fortran around with Bash scripts on linux.
If you insist on 3d data, I would take a second look at DISLIN, it can work quite well depending on what you need to visualize. The license is quite affordable for commericial-use. If using for academic use it's free.
Typically, a Fortran user creates massive data files then uses some 3rd party visualization software that fits the application. There are a couple of libraries that directly link to Fortran. Dislin is a fantastic one (particularly on Windows). It has a ton of documentation and once the learning curve is over you can create great GUI's as well. GnuplotFortran is an interface from Fortran to the standard gnuplot. I've yet to use it, but hear good things.
My choice would be something like PV-WAVE from Visual Numerics Inc. -- lately bought out by Rogue Wave Solutions.
This uses a big library of Fortran routines and employs its own special 4G language to speed up coding your own custom data displays.
This product is not cheap -- it was developed for applications like seismic data analysis, wind speed/direction data representation, simulation of things like airfoil flow, injection-molding cooling, stress analysis, etc -- but it is the best that I've seen.
Very clear documentation, examples supplied for each library sub-program, good help guide, direct line to tech support.
Leaves MatLab for dead.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a book, tool, software library, tutorial or other off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
does aybody know about an open source sound library in C++ or some other popular language that can be used in open source games for recreating sounds and especifically in car racing games to recreate engine sound?
Thanks
A long time ago, there was OpenAL and was moderately successful on Linux.
It's fairly easy, modelled around the OpenGL library principles.
While you got a few answers regarding how to output sound I believe that wasn't your question.
If I got your question correctly I think "Sound Synthesis" is what you are looking for.
All you need is a bunch of generators (e.g. Sine, Sawtooth, Noise)
and filters (low,high,band); And combine these.
Next step would be adding LFOs (Low-Frequency-Oscillators) to modulate parameters of the generators and filters.
I'm aware that this is not the full answer you looked for, but sound synthesis is a science in itself and the above keywords should get you started on the right track.
As for realtime synthesis of SFX for games. Simple answer:
Don't do it!
It's a waste of resources and - unless you have very strict size limits - the size of the samples used for SFX won't kill you.
For our current game the average sample has a(n on disk) size of around 7KB.
(We use 16KHz, mono, ADPCM wavs most of the time.)
I've only trivially poked around with it, but SDL is a very popular, cross-platform, C++ game dev library. It includes support for graphics, sound, input.
I also recall that it's very modular. That is, it's less of a framework and more of a library than some other solutions. Give it a look.
Is there a specific reason you need open source, or is "source available" good enough? A popular one is fmod http://www.fmod.org
It is free for non-commercial products, and also offers sourcecode under a license. It is very popular and isused in many well known games.
The irrKlang sound engine is very popular amoung independent developers. It is free for non-commercial use and still very cheap, if you want to start earning some money with your game.
It supports all major plattforms (Windows, Linux, Mac) and has APIs for C++ and .Net languages.
I know it's an old question, but I think SFML needs to be represented here. SFML is available in C++, C, .Net (C#, VB.Net, C++/CLI, etc), Python, D, and Ruby, and is designed to be small and fast.
Features specific to audio:
Uses hardware acceleration whenever possible
Can load and save standard sound formats : ogg, wav, flac, aiff, au, raw, paf, svx, nist, voc, ircam, w64, mat4, mat5 pvf, htk, sds, avr, sd2, caf, wve, mpc2k, rf64
Can load all audio resources directly from files in memory
3D sound spacialization
Easy interface for capturing audio
Manages memory efficiently, so that you don't have to worry about resources lifetime or storage
Supports streaming for big files ; you can even write your custom streaming class for any source (network, ...)
Supports multi-channels formats (mono, stereo, 4.0, 5.1, 6.1, 7.1)
For the specific question of recreating engine sounds, usually games take a single looping sound and adjust the pitch. An open source game that does this very well is VDrift.
SDL is Good Option for Graphics/Sound
QT frame work has also good support for sound and graphics
PortAudio is also good option
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a book, tool, software library, tutorial or other off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
I'm looking for recommendations for open-source projects written in C++ that will help me "get my chops back". A little background:
I've been working heavily in Java for the last three years, doing a lot of back-end development and system design, but with a fair amount of work in the presentation layer stuff, too.
The last C++ projects I worked on were a Visual C++ 6 project (designed to interact with Visual Basic) for mobile devices and several projects using the GNU toolchain circa gcc versions 2.x to 3.2
I'm looking to get back up to speed on the language and learn some of the popular frameworks, specifically the basics of boost (although boost seems fairly sprawling to me, similar to the kitchen-sink feel of Spring in the java space) and test driven development in C++.
What I'm looking for:
Specific recommendations for small to mid-size open source projects to poke through and perhaps contribute to as I level my C++ skills back up. The problem domain isn't important, except that I would like to work on something in a new area to broaden my experience.
Edit:
A few people have commented that it's difficult to provide a recommendation without some indication of the problem domain I'd like to work in. So, I've decided that I'm most interested in graphics applications or games, two areas which I haven't worked in before.
If you like visual stuff, openFrameworks is a C++ Framework for doing Processing-type applications. http://www.openframeworks.cc/ I'm not sure how viable it still is, but it looked pretty cool.
It's hard to suggest something like this, you really don't have any itches you want to scratch??
I would personally be working on Unladen Swallow if I wasn't absurdly busy starting my own personal venture. Dynamic language optimisation looks pretty cool to me.
You could also look at Wt
Why not Boost itself? It's a very active project, it's right at the core of what C++ is about, and it could need some help.
You mentioned test driven development. The Boost Unit Test Framework, for example, is powerful, but IMHO suffers from extremly bad documentation. That'd be a place to start, would teach you everything there is to know about that particular part of Boost, and I am sure you could find your way into one of the Boost modules from there.
I think you're going to have to be more specific. As a quick check, I did an apt-cache showpkg libstdc++6 on my Debian squeeze system, to find all the packages that depend on the C++ library — and found 4,537 of them. Obvious examples include:
most of KDE
Firefox, Thunderbird, etc.
apt-get itself
It'd really help if you specified what field you're interested in.
You can find many projects on GitHub. If you find a nice project, you can fork it (it's like creating a local copy you can work on) and start coding. Once you have done something nice, you can make a "Pull request" to ask the guy you made your fork from to merge your work.
I like being able to commit without having to ask for an access and be able to make smalls contributions to many projects without having to contact anybody, simply with a couple of clicks.
You can also check Gitorious and Bitbucket, both site work a bit like Github.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
I looked at the different options for plotting functions (or other types of graphs) in an interactive window. I mostly use wxWidgets but I'd be open to any other "interfaces".
Looking at what is available, here is what I've found:
wxPlot: Not updated since 2006. But it would be a good candidate if it was...
wxMathPlot: Very new, not mature, few features (still active?)
libgraph: Outdated, not rebust, 2D only and outputs images only.
koolplot: Too basic, no control over the created window.
EasyBMP: Very basic, only images output.
plotutils: Command line only.
plplot: C and C++ API are barely maintained. It is in fact on this that wxPlot is based. Could be a could candidate also if C and C++ interface we're updated.
Any comments? Ideas?
Thanks!
Even though this thread is old but gold. QCustomPlot is very recommendable as well to complement this list.
MathGL have many plot types, C/Fortran interface and basic data analysis
I'm all about ROOT for these needs. Pretty heavy if you don't need all the analysis support, though.
You have Qwt which is mature. There is a 3D version lurking somewhere. However, I have never been satisfied with the aesthetic result.
It may be worth waiting for Qt3D to come out to write something better yourself easily.
I programmatically provide required input files to GNUPlot executable and invoke it using system() function. It is suitable to my situation since I only want to visualize my data during research. But if you want the plotting functionality integrated into your executable file, maybe this is not for you :)
u can use DISLIN
it is quite neat!
Might wxChart be an option? I have not used it myself however and it looks like it hasnt been updated for a while.
Just an idea: Use Python as embeddable scripting language to plot your graphs. Python has a plethora of plotting libraries.
I found the game library Allegro easy to use back in the day. Might be worth a look.
We use an ancient version of ComponentOne Chart.
AntiGrain Geometry (AGG). http://www.antigrain.com/. Its an opensource 2D vector graphics library. Its a standalone library with no additional dependencies. Has good documentation. Python plotting library matplotlib uses AGG as one of backends.
Have a look at wxArt2d it is a complete framework for 2d editing and plotting. See the screenshots for more examples.
Some interesting features:
Reading and writing SVG and CVG
Several views of the same document
Changes are updated when idle
Optimized drawing of 2d objects
Hey! I'm the developer of wxMathPlot! The project is active: I just took a long time to get a new release, because the code needed a partial rewriting to introduce new features. Take a look to the new 0.1.0 release: it is a great improvement from old versions. Anyway, it doesn't provide 3D (even if I always thinking about it...).
OpenGL. It WILL be hard and possibly rewriting the wheel, though.
Keep in mind that OpenGL is a general 3D library, and not a specific plot library, but you can implement plotting based on it.