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 : Wednesday, June 16, 2010 9:12:21 AM(UTC)
sekinanboku

Groups: Registered
Posts: 6


Hi,

I am using the RasterImageViewer for an image processing application. I use the Leadtools filters and functions extensively. However, there are a couple of filters that I need to run which are not supplied by Leadtools. So ... I need to extract a bitmap from the RasterImage, manipulate it with my filter routines and then place it back into the RasterImage. Not sure how to do this, can you help. Using imaging toolkit version 16.5 Pro. Thanks in advance
 

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.

#2 Posted : Thursday, June 17, 2010 5:43:41 AM(UTC)

Basel  
Guest

Groups: Guests
Posts: 3,022

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

You can use CreateGdiPlusGraphics Method which creates a GDI+ Graphics object using the RasterImage.

Using CreateGdiPlusGraphics, you don't need to place the image back into the RasterImage. The RasterImage will be affected with your effects.

For more information please see the help topic "CreateGdiPlusGraphics Method" in our .NET help file.
 
#3 Posted : Thursday, June 17, 2010 6:38:11 AM(UTC)
sekinanboku

Groups: Registered
Posts: 6


Thanks for the reply.
However, I don't want to manipulate the graphics surface. I need to extract a bitmap which is passed to methods that carry out pixel-level manipulations and then I need to reinsert/reload the bitmap into the RasterImage.
 
#4 Posted : Friday, June 18, 2010 7:01:50 AM(UTC)

Walter  
Walter

Groups: Tech Support
Posts: 366

Thanks: 1 times
Was thanked: 4 time(s) in 4 post(s)

Hello,

There are a couple ways you could go about getting access to the data within a RasterImage. One would be to use the read-only Data property (and the DataSize property). You could also use the GetRow/GetRowColumn and the SetRow/SetRowColumn methods to get a byte array of the specified data.

If your methods require a .NET Image to be used, you could use the TestGdiPlusCompatible, MakeGdiPlusCompatible, and ConvertToGdiPlus image methods.

After making your changes, you can then use the overloaded RasterImage contructors to then use the bitmap with LEADTOOLS again.

The RasterImage class also has ToDib/FromDib methods as well.
Walter Bates
Senior Support Engineer
LEAD Technologies, Inc.
LEAD Logo
 
#5 Posted : Tuesday, May 30, 2017 8:44:45 AM(UTC)
BonzoFestoon

Groups: Administrators
Posts: 27

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

There is a blog post that covers different ways to access the image data.

Do it in the Buffer: Comparison of RasterImage Image Data Access Methods in .NET

Quote:
There are several ways to access the data in a RasterImage. If you need to get the RGB values of each pixel, then the GetPixel() and GetRow() methods are the simplest methods to use.

Few Pixels
If you need to get just one pixel, then GetPixel() is the easiest. GetPixel() works with image data of any Read more...
Gabriel Smith
LEAD Technologies, Inc.

LEAD Logo
 
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.130 seconds.