C++Language FeatureLearn C++

How To Use Scanline In Bitmaps In A VCL C++ App?

How To Use Scanline In Bitmaps In A VCL C++ App

What is ScanLine? How can I use ScanLine in my C++ app built using the VCL?

The ScanLine method provides indexed access to each line of pixels of bitmaps, in VCL apps, i.e Image1->Picture-<Bitmap. ScanLine is used only with DIBs (Device Independent Bitmaps) for image editing tools that do low-level pixel work.

How to use Scanline in bitmaps in a C++ app?

Scanline provides indexed access to each line of pixels. It’s used only with DIBs (Device Independent Bitmaps) for image editing tools that do low-level pixel work. Here’s a simple example of how to use Scanline

where y is an integer that shows the line of bitmap scanned ( maximum is the height-1 of bitmap)

How to use Scanline to scale bitmaps in C++ Builder VCL C++ app?

This official C++ Builder Scanline example shows how to create and draw a scaled bitmap directly by using ScanLine method. It loads a bitmap from a file and then copies it to another bitmap twice its size. Then the two bitmaps are displayed on the form canvas.

How to use Scanline in a C++ Builder FireMonkey C++ App?

In FireMonkey (FMX) application we can use TBitmapData property to read and write ARGB values of a bitmap, For a FMX application on bitmaps please check this example below:

C++ Builder is the easiest and fastest C and C++ IDE for building simple or professional applications on the Windows, MacOS, iOS & Android operating systems. It is also easy for beginners to learn with its wide range of samples, tutorials, help files, and LSP support for code. RAD Studio’s C++ Builder version comes with the award-winning VCL framework for high-performance native Windows apps and the powerful FireMonkey (FMX) framework for cross-platform UIs.

There is a free C++ Builder Community Edition for students, beginners, and startups; it can be downloaded from here. For professional developers, there are Professional, Architect, or Enterprise versions of C++ Builder and there is a trial version you can download from here.

Oh hi there 👋
It’s nice to meet you.

Sign up to receive awesome C++ content in your inbox, every day.

We don’t spam! Read our privacy policy for more info.


Reduce development time and get to market faster with RAD Studio, Delphi, or C++Builder.
Design. Code. Compile. Deploy.
Start Free Trial

Free C++Builder Community Edition

About author

Dr. Yilmaz Yoru has 35+ years of coding with more than 30+ programming languages, mostly C++ on Windows, Android, Mac-OS, iOS, Linux, and some other operating systems. He graduated and received his MSc and PhD degrees from the Department of Mechanical Engineering of Eskisehir Osmangazi University. He is the founder and CEO of ESENJA LLC Company. His interests are Programming, Thermodynamics, Fluid Mechanics, Artificial Intelligence, 2D & 3D Designs, and high-end innovations.
Related posts
C++C++11C++14C++17C++20Introduction to C++Learn C++

Learn Copy Constructors in C++ Classes

C++C++11C++14C++17Introduction to C++Learn C++Syntax

Learn How To Use Types Of Destructors In C++?

C++C++11C++14Learn C++Syntax

How To Convert u32string To A wstring In C++

C++C++11C++14C++17C++20Introduction to C++Learn C++

How To Learn The Move Constructors In Modern C++?