Changing the brightness in a TBitmap

Problem: How to change the brightness of images in a FireMonkey TBitmap

Environment
– C++Builder 10.3.3
– Windows 10

This post will demonstrate how to do some simple image processing on a FireMonkey TBitmap. Specifically, it will provide code that you can use to make a wide variety of changes to the brightness of an image. The technique is most applicable to black-and-white pictures but you can modify the code to work on color images. The code in this post doesn’t apply to VCL but if you need to enhance FireMonkey images, read on!

Continue reading “Changing the brightness in a TBitmap”

Accessing pixels in TBitmap – Part II

Problem: How to access the pixels in a FireMonkey TBitmap

Environment
– C++Builder 10.3.3
– Windows 10

In this post I’ll show three different ways of changing the pixels of an image stored in a FireMonkey TBitmap. I’ll use the techniques to demonstrate some simple image-processing operations such as adjusting the overall brightness and contrast of an image. The information in this post doesn’t apply to VCL but if you need to modify the pixels in a FireMonkey image, read on!

Continue reading “Accessing pixels in TBitmap – Part II”

Accessing pixels in TBitmap – Part I

Problem: How to access the pixels in a FireMonkey TBitmap

Environment
– C++Builder 10.3.3
– Windows 10

In this post I’ll demonstrate three different ways of accessing the pixels of an image stored in a FireMonkey TBitmap. The information doesn’t apply to VCL but if you need access to pixels in a FireMonkey image, read on!

Continue reading “Accessing pixels in TBitmap – Part I”

Using Deleaker in C++ Builder

Problem: How to use Deleaker in C++ Builder

Environment
– C++Builder 10.3.3
– Deleaker 2019.39.0.0
– Windows 10

In this post I’ll review Deleaker, a mature product for detecting memory leaks. It works with C++, C#, Delphi and .NET. If you’re interested in finding out about a very helpful tool for finding memory leaks, read on!

Continue reading “Using Deleaker in C++ Builder”

Count name-value pairs in a TStringList

Problem: How to get the number of name-value pairs in TStrings or TStringList

Environment
– C++Builder 10.3.2
– Windows 10

TStrings is an abstract class that represents a collection of text strings and methods for working with them. It is part of the Delphi Run-Time Library (RTL) and is available in C++ Builder. Besides just containing a series of strings it also allows the user to enter text in name-value pairs. TStrings can then function as a dictionary, i.e., a component in which a particular text value is retrieved by specifying a text key, which TStrings calls a “name”. Although TStrings lets you get the number of strings it is storing, it provides no way to find out how many name-value pairs it contains. In this post, we’ll see how to do that.

Continue reading “Count name-value pairs in a TStringList”
%d bloggers like this: