This topic and its replies were posted before the current version of LEADTOOLS was released and may no longer be applicable.
#1
Posted
:
Thursday, November 25, 2010 8:14:52 PM(UTC)
Groups: Registered
Posts: 21
Hello..(Leadtool16) I have attached an image , actually, i want to change the background of transparent image in rasterimageviewer, like that picture...
Noufal attached the following image(s):
#2
Posted
:
Thursday, November 25, 2010 8:19:49 PM(UTC)
Groups: Registered
Posts: 21
The Viewer should look like the following image
#3
Posted
:
Thursday, November 25, 2010 8:21:23 PM(UTC)
Groups: Registered
Posts: 21
The rasterimageviewr should look like the following image
Noufal attached the following image(s):
#4
Posted
:
Saturday, November 27, 2010 11:19:50 PM(UTC)
Groups: Guests
Posts: 3,022
Was thanked: 2 time(s) in 2 post(s)
You can do that using RasterImageViewer.BackgroundImage() Method. This code will set the background to black:
RasterImage image = new RasterImage(RasterMemoryFlags.Conventional, 200, 200, 24, RasterByteOrder.Bgr, RasterViewPerspective.LeftTop, null, IntPtr.Zero, 0);
Image backImage1 = image.ConvertToGdiPlusImage();
_viewer.BackgroundImage = backImage1;
You can use a similar code to load your image like this:
RasterCodecs codecs = new RasterCodecs();
RasterImage image = codecs.Load(@"C:\test.PNG");
Image destImage1 = image.ConvertToGdiPlusImage();
_viewer.BackgroundImage = destImage1;
Guest attached the following image(s):
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.