This topic and its replies were posted before the current version of LEADTOOLS was released and may no longer be applicable.
#1
Posted
:
Wednesday, November 5, 2008 3:09:19 AM(UTC)
Groups: Registered
Posts: 53
Hi,
I am working the Rasterimageviewer to display layered images. I would highly appreciate if you send us sample code on how to make the floaterimage transparent in order to see the layered images.
thanks & regards
#2
Posted
:
Wednesday, November 5, 2008 5:56:31 AM(UTC)
Groups: Guests
Posts: 3,022
Was thanked: 2 time(s) in 2 post(s)
I'm afraid that you can't do this with the Floaterimage. You might be able to do this if you use Stamp Annotation object and set a transparent color.
#3
Posted
:
Tuesday, November 11, 2008 12:58:47 AM(UTC)
Groups: Registered
Posts: 53
thanks for the reply. I would like to reduce the opacity by 50% in the floaterimage or annpicture object. would highly appreciate if you send us any workaround.
thanks
#4
Posted
:
Tuesday, November 11, 2008 2:34:41 AM(UTC)
Groups: Registered
Posts: 53
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()
#5
Posted
:
Tuesday, November 11, 2008 5:05:42 AM(UTC)
Groups: Guests
Posts: 3,022
Was thanked: 2 time(s) in 2 post(s)
Guna,
Currently, we do not have such a method to allow opacity with stamp annotation object, we only have the ability to provide transparent color.
We do have, however, a feature request regarding this (using stamp annotation with opacity) but this is not implemented yet, and we don't know if it will be added nor when.
I will update this forum post when this incident is available and if you want to be personally notified when this feature is available, send an email to
support@leadtools.com and ask to be added to the feature's notification list for request number 7424AMN
#6
Posted
:
Friday, December 5, 2008 1:31:06 AM(UTC)
Groups: Registered
Posts: 53
Hi,
We Would like to know the status of the feature whether it has been added.
Thanks & regards
#7
Posted
:
Friday, December 5, 2008 10:14:57 AM(UTC)
Groups: Registered, Tech Support, Administrators
Posts: 764
There is no update for this feature request at this time. If chosen for implementation, most feature requests are added at major releases (16, 17 etc.).
If this is an urgent need, please contact our custom development department by visiting
http://www.leadtools.com/devservices/ for a quote.
As a workaround, you would need to use the FeatherAlphaBlendCommand class to combine an image on top of another with alpha transparency. If you want to drag it around, you will need to handle the mouse events and re-combine the original background image and the foreground alpha blended image.
___________________________
Update: Version 19 of LEADTOOLS has opacity support for stamp objects in the .NET new annotations design.
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.