Brightness

The Brightness method adjusts brightness of image or image area: it makes image darker or lighter.

Brightness vLevel[, vX][, xY][, vWidth][, vHeight]

Parameters

vLevel
Specifies effect volume. Positive values make image lighter. Negative ones make image darker. Valid values range is from -100 to 100.

vX
Optional. Specifies left coordinate of brightness area on the imagespace. Default value is 0.

vY
Optional. Specifies top coordinate of brightness area on the imagespace. Default value is 0.

vWidth
Optional. Specifies width of brightness area on the imagespace. Default value is imagespace width.

vHeight
Optional. Specifies height of brightness area on the imagespace. Default value is imagespace height.

Example

Set g = CreateObject("shotgraph.image")
file_name = "c:\files\image.jpg"
g.GetFileDimensions file_name,xsize,ysize
g.CreateImage xsize,ysize,256
g.ReadImage file_name,palette,0,0
g.Brightness 50
g.JpegImage 95,0,"c:\newimage.gif"