11-11-2008, 7:39
|
Gunasekaran

Joined on 05-07-2008
Chennai,India
Posts 174
|
Re: How to make the Floaterimage transparent
|
 
 
|
|
|
I tried to add an annotationstamp object to get the result like the following. But it seems that the imageattributes property of the annpicture object is readonly. I am not sure that whether that is one doesn't allow me get the opacity of the image. If you can provide some workaround or a patch it would be veryuseful.
RasterImageViewer2.Image = codecs.Load("d:\\4002.jpg")
Dim stamp As AnnStampObject = New AnnStampObject Dim pic As New AnnPicture(Image.FromFile("D:\\327.bmp")) pic.TransparentMode = AnnPictureTransparentMode.UseColor pic.TransparentColor = Color.Black
Dim ia As Imaging.ImageAttributes = pic.ImageAttributes Dim cmxPic As Imaging.ColorMatrix = New Imaging.ColorMatrix() cmxPic.Matrix33 = 128
'Dim iaPic As Imaging.ImageAttributes = New Imaging.ImageAttributes() ia.SetColorMatrix(cmxPic, Imaging.ColorMatrixFlag.Default, Imaging.ColorAdjustType.Bitmap) Dim gfxPic As Graphics = Graphics.FromImage(pic.Image) gfxPic.DrawImage(pic.Image, New Rectangle(0, 0, pic.Image.Width, pic.Image.Height), 0, 0, pic.Image.Width, pic.Image.Height, GraphicsUnit.Pixel, ia) gfxPic.Dispose()
Thanks and Regards Guna
|
|
|
|
|
Report
|
|
|
|