Image effects

An extension and library for manipulating images.

File:
ifx.lib, ImageEffects.dll
Version:
1.0
Author:
Marcus Johansson

Contents

Details
Sub routines


Details

You can use this library to apply different effects, such as blur and contrast changes, to images. Unless you've set the NaaLaa target image ('set image') to something else, the operations will be performed on the primary image (backbuffer). None of the functions cause an automatic redraw when drawing to the primary image. That is, even if automatic redraw is enabled ('set redraw true', default behaviour), you must call 'redraw' to update the window.


Subroutines

Name
Parameters
Brief description
function
IFX_Init
Init the library.
procedure
IFX_Blur
radius
Blur target image (usually primary).
procedure
IFX_BW
Make image black and white.
procedure
IFX_Contrast
contrast#
Change image contrast.
procedure
IFX_ContrastRGB
red#, green#, blue#
Change contrast of individual color channels.
procedure
IFX_Multiply
red#, green#, blue#
Multiply.
procedure
IFX_Brightness
value#
Change brightness.


Subroutine documentation

function IFX_Init ( )

This function must be called prior to using any of the other functions.

Return value
True on success, else false.

[ Back ]


procedure IFX_Blur ( radius )

Parameter
Mode
Description
radius
In
Pixel radius of blur effect.

[ Back ]


procedure IFX_BW ( )

Make image black and white.

[ Back ]


procedure IFX_Contrast ( contrast# )

Change the contrast of the image. A contrast value of 1.0 has no effect. A value of 0.0 makes the image completely grey, while values higher than 1.0 will increase the contrast.

Parameter
Mode
Description
contrast#
In
Contrast value.

[ Back ]


procedure IFX_ContrastRGB ( red#, green#, blue# )

This function works like IFX_Contrast but uses different contrast values for the three color channels (red, green and blue).

Parameter
Mode
Description
red#
In
Contrast value for the red color channel.
green#
In
Contrast value for the green color channel.
blue#
In
Contrast value for the blue color channel.

[ Back ]


procedure IFX_Multiply ( red#, green#, blue# )

Use this function to multiply the color of an image with individual constants for red, green and blue. A value of 1.0 has no effect.

Parameter
Mode
Description
red#
In
Constant for red color channel.
green#
In
Constant for green color channel.
blue#
In
Constant for blue color channel.

[ Back ]


procedure IFX_Brightness ( value# )

This is the same as calling IFX_Multiply with the same value for all color channels. A value of 1.0 has no effect, while 0.0 makes the image completely black.

Parameter
Mode
Description
value
In
Brightness value.

[ Back ]


Generated with NLDoc 20160604.