ImageMan ActiveX Control Version 8
Blue Property
See Also  Example  Send comments on this topic.
Specifies the index of the palette entry to Get/Set.

Glossary Item Box


Returns/sets the blue value for a color entry in the image's palette.

Property type

Read-write property


Visual Basic
Public Property Blue( _
   ByVal index As Integer _
) As Long


Specifies the index of the palette entry to Get/Set.


Use this property along with the Red and Green properties to change the colors in palettized  images. After changing these properties you must call the Refresh method to redraw the image with the new colors. The Index value must be between 0 and the value of the PaletteEntries property. The allowable values for the property are 0 to 255.


Using Reb, Green, Blue Properties (Visual Basic)Copy Code
' Darken an image by subtracting a value from each palette entry

Dim intIdx

If ImageControl1.ImageColors <= 256 Then ' There's No Palette on 24 bit Images

    For Idx = 0 To ImageControl1.PaletteEntries - 1

        ImageControl1.Red(Idx) = ImageControl1.Red(Idx) - 10
        ImageControl1.Green(Idx) = ImageControl1.Green(Idx) - 10
        ImageControl1.Blue(Idx) = ImageControl1.Blue(Idx) - 10

    Next Idx

End If

See Also

© 2014 Data Techniques Inc. All Rights Reserved.