|www.progui.co.uk Top Previous Next|
*newImage = ImgHueBlend(*SourceImage, AlphaChannel.f, HueColor.l, Saturation.f, Lightness.f, BlendColor.l, BlendAmount.f, Flags.i)
ImgHueBlend is a powerful and versatile image effect command for creating a new image/icon based on altering a source icon/image's alpha channel, colour hue and/or blend amount with another colour. A common use for this command is automatically generating images for hot and disabled states (based on one stored image) for use in other ProGUI commands.
*SourceImage is a pointer to the icon/image that you wish to manipulate. AlphaChannel.f specifies the new transparency level (also taking into account the existing alpha channel data) and can be in the range of 0 to 255 (0 = fully transparent, 255 = solid). HueColor.f specifies the new RGB colour hue (tint). Saturation.f adjusts the saturation of the image (range -1 to 1) and can be null. Lightness specifies the new luminance of the image (in the range of 0 to 1). BlendColor.l specifies an RGB colour value that will be used with BlendAmount.f (0 to 255) in order to blend the new image to that colour, Color.l and BlendAmount.f can both be Null in order to have no effect. Flags.i can contain the following constants: -
#ImgBlend_ReturnIcon Returns an Icon (HICON) as *newImage instead of an image (HBITMAP).
#ImgBlend_DestroyOriginal Destroys the original *SourceImage.
Returns a pointer to the new image/icon or zero for failure.
The returned *newImage can later be destroyed when not needed anymore by using the FreeImg command.