Welcome Guest! To enable all features, please Login or Register.

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Sunday, November 30, 2014 10:16:32 PM(UTC)

Amin  
Amin

Groups: Manager, Tech Support
Posts: 367

Was thanked: 1 time(s) in 1 post(s)

If the bitmap has a region, many LEADTOOLS processing functions act on the region instead of the full image.
This code sample shows how to add emphasis to part of the image by dimming out the rest of the image.
The C# code is simply this:

img.AddRoundRectangleToRegion(null, new LeadRect(80, 80, 400, 200), new LeadSize(90, 90), RasterRegionCombineMode.SetNot);
ChangeIntensityCommand changeIntensity = new ChangeIntensityCommand(-300);
changeIntensity.Run(img);

Where img is a RasterImage.
The code defines a region for all parts outside the emphasis area then reduces the intensity of these parts.

The attached image shows how the bitmap looks before processing and after.
File Attachment(s):
ProcessRegion.jpg (319kb) downloaded 61 time(s).
Amin Dodin

Senior Support Engineer
LEAD Technologies, Inc.
LEAD Logo
 

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

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.

Powered by YAF.NET | YAF.NET © 2003-2024, Yet Another Forum.NET
This page was generated in 0.052 seconds.