Check out my latest posts to find out more about my life, my music, my software, or even my dog!

C++ and SDL2 - Lightweight Image Processing Library - Now on GitHub

Quick update! I've been spending the past month or so developing a portable library for manipulating SDL2 surfaces prior to texture conversion. I've just uploaded it to GitHub so that you can download it and hopefully try it out (and maybe even add to it if you have some good ideas!)

I'm also very open to criticism on my techniques in C++ (Self taught over the past decade; I'm bound to have picked up some bad habits here and there, but I am always trying to improve).

It currently depends on SDL2 and SDL2_image (for loading additional file types), however text will be coming soon as well through SDL2_ttf. Still very much a work in progress, I'd eventually like to possibly use it as a very lightweight alternative to OpenCV or even Matlab (ambitious, I know).


It supports the vast majority of functions found in the 'transform.h' file, including some really cool histogram graphing functionality. It also supports kernel operations for blurring, embossing, etc. and adjustment algorithms for modifying brightness, contrast, highlights, shadows, gamma, etc. Another cool feature is the 'Trace' function to outline a pseudo-binary surface (I say pseudo here because the values generated are either 0 or 255, rather than 0 or 1). For higher accuracy, it is recommended that you first Blur the surface before passing the Trace function. It could open up possibilities for some really interesting object tracking and analysis functions, photogrammetry, etc.

I'm also very new to GitHub, so I apologize if I messed anything up on there (in which case, definitely let me know so I don't make the same mistakes in the future!). This is basically the first time that I've posted any of my personal code online. Be sure to submit any feature requests and ideas, I want this thing to be extremely useful for anybody using it.

I'll post some screenshots in a bit for you guys.