Welcome Guest! You need to login or register to make posts.

Notification

Icon
Error

Options
Go to last post Go to first unread
maurib80@gmail.com  
#1 Posted : Friday, May 7, 2010 7:35:25 PM(UTC)
maurib80@gmail.com

Rank: Member

Groups: Member
Joined: 4/6/2010(UTC)
Posts: 24

Hi
Is Possibile view a example code in VB.NET for windows application this Function?

Brightness and contrast on TrackBar1_Scroll with MultiLayerViewer1

applied on Layer and only VObject in Layer.....

Thank you for reply
Maurizio
maurib80@gmail.com  
#2 Posted : Sunday, May 9, 2010 10:06:54 PM(UTC)
maurib80@gmail.com

Rank: Member

Groups: Member
Joined: 4/6/2010(UTC)
Posts: 24

Pray
help me please

Pray
Tamila  
#3 Posted : Monday, May 10, 2010 8:08:46 PM(UTC)
Tamila

Rank: Advanced Member

Groups: Member
Joined: 3/9/2008(UTC)
Posts: 554

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

You can implement brightness and contrast to bitmap of particular ImageVObject. However _image field is a private in ImageVObject. So you can get it using Reflection only:
Code:
Dim imageInfo As System.Reflection.FieldInfo = _
	imageVObj.GetType().GetField("_image", _
	System.Reflection.BindingFlags.NonPublic Or _
	System.Reflection.BindingFlags.DeclaredOnly Or _
	System.Reflection.BindingFlags.Instance)
Dim image As Aurigma.GraphicsMill.Bitmap = _
	CType(imageInfo.GetValue(imageVObj), _
	Aurigma.GraphicsMill.Bitmap)

Now you can implement brightness and contrast to this bitmap. How to work with these effects you can find in Main Demo sample.


Aurigma Support Team

UserPostedImage Follow Aurigma on Twitter!
maurib80@gmail.com  
#4 Posted : Wednesday, May 12, 2010 8:06:00 PM(UTC)
maurib80@gmail.com

Rank: Member

Groups: Member
Joined: 4/6/2010(UTC)
Posts: 24

Hi Tamila
I have see MainDemo sample for VB.NET
but if i change value i don't see preview in image but i see my modified after i click ok button :(....

If i have in VB.NET TrackBar1_Scroll with maximum value 100 and Minimum vale -100
when i change value is possible see in Multilayerviewe1 the changes ?

i have try in This mode but don't work...

Private Sub TrackBar1_Scroll(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TrackBar1.Scroll

Dim LumBri As New Aurigma.GraphicsMill.Transforms.BrightnessContrast
LumBri.BrightnessAmount = TrackBar1.value

end sub

Thank you
Maurizio
Tamila  
#5 Posted : Wednesday, May 12, 2010 8:11:44 PM(UTC)
Tamila

Rank: Advanced Member

Groups: Member
Joined: 3/9/2008(UTC)
Posts: 554

Was thanked: 1 time(s) in 1 post(s)
Quote:
when i change value is possible see in Multilayerviewe1 the changes ?
Unfortunately it is impossible for MultiLayerViewer.
Aurigma Support Team

UserPostedImage Follow Aurigma on Twitter!
maurib80@gmail.com  
#6 Posted : Wednesday, May 12, 2010 8:34:50 PM(UTC)
maurib80@gmail.com

Rank: Member

Groups: Member
Joined: 4/6/2010(UTC)
Posts: 24

System exists to do this? :(
maurib80@gmail.com  
#7 Posted : Thursday, May 13, 2010 5:53:07 PM(UTC)
maurib80@gmail.com

Rank: Member

Groups: Member
Joined: 4/6/2010(UTC)
Posts: 24

hi
if i have a layer0 with Photo
because impossibile adjust Brightness and Contrast or impossibile example applyed GrayScale?

i try in this mode but dont'work :(

Dim BrighContr As New Aurigma.GraphicsMill.Transforms.BrightnessContrast
Dim layer1 As New Aurigma.GraphicsMill.WinControls.Layer("First")

MultiLayerViewer1.CurrentLayer = layer2

BrighContr.BrightnessAmount = 0.9F

BrighContr.ApplyTransform(MultiLayerViewer1.CurrentLayer = layer2 )



thank you
:(

Edited by user Thursday, May 13, 2010 6:22:02 PM(UTC)  | Reason: Not specified

Tamila  
#8 Posted : Thursday, May 13, 2010 7:38:40 PM(UTC)
Tamila

Rank: Advanced Member

Groups: Member
Joined: 3/9/2008(UTC)
Posts: 554

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

The following line is incorrect:
Code:
BrighContr.ApplyTransform(MultiLayerViewer1.CurrentLayer = layer2 )

ApplyTransform() method needs a bitmap, not a layer.

You should use something like this:
Code:
Dim imageInfo As System.Reflection.FieldInfo = _
    imageVObj.GetType().GetField("_image", _
    System.Reflection.BindingFlags.NonPublic Or _
    System.Reflection.BindingFlags.DeclaredOnly Or _
    System.Reflection.BindingFlags.Instance)
Dim image As Aurigma.GraphicsMill.Bitmap = _
    CType(imageInfo.GetValue(imageVObj), _
    Aurigma.GraphicsMill.Bitmap)

Dim BrighContr As New Aurigma.GraphicsMill.Transforms.BrightnessContrast
BrighContr.BrightnessAmount = 0.9F
BrighContr.ApplyTransform(image)
'Now you can put transformed bitmap image into new imageVObj instead of current

MultiLayerViewer1.CurrentLayer.VObjects.Remove(imgVObj)
Dim newImgVObj As Aurigma.GraphicsMill.WinControls.ImageVObject(image, False, 0, 0)
MultiLayerViewer1.CurrentLayer.VObjects.Add(newImgVObj)

Edited by user Thursday, May 13, 2010 7:50:54 PM(UTC)  | Reason: Not specified

Aurigma Support Team

UserPostedImage Follow Aurigma on Twitter!
maurib80@gmail.com  
#9 Posted : Thursday, May 13, 2010 10:12:47 PM(UTC)
maurib80@gmail.com

Rank: Member

Groups: Member
Joined: 4/6/2010(UTC)
Posts: 24

ok i try your method:

in last two line i have a error:

Dim newImgVObj As Aurigma.GraphicsMill.WinControls.ImageVObject(image, False, 0, 0)
MultiLayerViewer1.CurrentLayer.VObjects.Add(newImgVObj)

image????
newimgvobj???

i past all line:

Code:
Dim bmp As New Aurigma.GraphicsMill.Bitmap
        Dim imgVObj As New Aurigma.GraphicsMill.WinControls.ImageVObject(bmp, False, 0, 0)
        Dim imageInfo As System.Reflection.FieldInfo = imgVObj.GetType().GetField("_image", _
        System.Reflection.BindingFlags.NonPublic Or System.Reflection.BindingFlags.DeclaredOnly Or System.Reflection.BindingFlags.Instance)
        Dim image As Aurigma.GraphicsMill.Bitmap = CType(imageInfo.GetValue(imgVObj), Aurigma.GraphicsMill.Bitmap)
Dim BrighContr As New Aurigma.GraphicsMill.Transforms.BrightnessContrast

        BrighContr.BrightnessAmount = 0.9F
        BrighContr.ApplyTransform(image)

        'Now you can put transformed bitmap image into new imageVObj instead of current
        
        MultiLayerViewer1.CurrentLayer.VObjects.Remove(imgVObj)
        Dim newImgVObj As Aurigma.GraphicsMill.WinControls.ImageVObject(image, False, 0, 0)  
        MultiLayerViewer1.CurrentLayer.VObjects.Add(newImgVObj)


this method is possibile usage Grayscale and adjust color and other effect ?

Thank you Tamila
Maurizio
Tamila  
#10 Posted : Sunday, May 16, 2010 12:14:13 PM(UTC)
Tamila

Rank: Advanced Member

Groups: Member
Joined: 3/9/2008(UTC)
Posts: 554

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

Quote:
ok i try your method:

in last two line i have a error:

Dim newImgVObj As Aurigma.GraphicsMill.WinControls.ImageVObject(image, False, 0, 0)
MultiLayerViewer1.CurrentLayer.VObjects.Add(newImgVObj)

image????
newimgvobj???
This problem appears because the New is lost in Dim newImgVObj ...
So the following lines are right:
Code:
Dim newImgVObj As New Aurigma.GraphicsMill.WinControls.ImageVObject(image, False, 0, 0)
MultiLayerViewer1.CurrentLayer.VObjects.Add(newImgVObj)


Quote:
this method is possible usage Grayscale and adjust color and other effect ?
You can apply any effects to image Bitmap (see the code above). About applying effects I recommend you to read these articles.

Edited by user Sunday, May 16, 2010 12:15:04 PM(UTC)  | Reason: Not specified

Aurigma Support Team

UserPostedImage Follow Aurigma on Twitter!
Users browsing this topic
Forum Jump  
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.