LEADTOOLS Support
General
General Questions
How to draw text on a 16 bpp grayscale image
This topic and its replies were posted before the current version of LEADTOOLS was released and may no longer be applicable.
#1
Posted
:
Tuesday, May 24, 2011 6:10:52 AM(UTC)
Groups: Registered, Tech Support
Posts: 207
Was thanked: 3 time(s) in 3 post(s)
The attached project illustrates how this can done.
We create two 16 bit grayscale images in the demo, but in your case you'll already have the 16 bit grayscale image.
We first create an 8 bit grayscale image and draw on the image the text we wish to have appear on the 16 bit image. Next we convert the 8 bit grayscale image to 16 bits per pixel. Next, we create a region based on all colors but black. This will turn the text we drew into a region. We then fill the region (text) with a gray color and combine the region into target 16 bit grayscale image. Finally we free the region on the target image, leaving just the text behind.
This x86 project is written in C# using Visual Studio 2008.
Travis Montgomery
Senior Sales Engineer
LEADTOOLS Support
General
General Questions
How to draw text on a 16 bpp grayscale image
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.