Category: Blog
-
Visualising SRGB & Gamma Correction
Introduction There are plenty of fantastic websites out there which explain the technicalities of Gamma Correction and SRGB colour correction so won’t try to do the same here. Instead this post is to show visually the effects of SRGB/Gamma Correction in image composition and how blending colours in SRGB space rather than linear space is…
-
Redirect all stdout/stderr to console
If your Windows executable is using /SUBSYSTEM:WINDOWS rather than /SUBSYSTEM:CONSOLE, something you will have noticed your output messages to stdout (printf, std::cout etc) will be missing. You can easily solve this however by spawning your own Windows console window and redirecting stdout to your new console. The code below will redirect all stdout & stderr…
-
Increase Windows Console Line Limit
If you’re in a situation where your console output text is being truncated because so many lines have been output, you may want to increase the limit. Increase Windows Console Text Limit With a console window already spawned, right click the top and go to properties: Increase the Screen Buffer Size Height. You will be…
-
Faster Compiling: Visual Studio Unity (Jumbo) Builds
Unity/Jumbo builds are a way of speeding up C/C++ compilation by compiling multiple c/cpp files as a single object file. Speed improvements can come from not having to re-parse and compile shared headers. Even in projects that use pre-compiled headers, there is an overhead of processing the pre-compiled header which can be avoided with Unity/Jumbo…
-
Programming a Digital Potentiometer (MCP4131) With Raspberry Pi & WiringPi
Github Link: https://github.com/comeradealexi/MCP4131 Datasheet One of the most important parts of programming an MCP is studying the datasheet provided with it. For the MCP4131, you can download it here: https://www.microchip.com/en-us/product/MCP4131 It will provide everything you need to know about the chip. One of the most basic pieces of information we’ll need to start with is…