ImageFilterColorMap()
These are passed to the function ImageFilters (see ImageFilter() documentation) which convert gray values to colors.
Requires Extension: Image Extension for Jakarta EE (Lucee 7+)
ImageFilterColorMap( type=string, lineColor1=string, lineColor2=string );
Returns: any
| Argument | Description |
|---|---|
|
type
string,
required
|
edit
type of the color map, possible values are:
|
|
lineColor1
string,
optional
|
edit
used only for type "linear", the color corresponding to value 0 in the colormap. Alias: lineColour1 |
|
lineColor2
string,
optional
|
edit
used only for type "linear", the color corresponding to value 1 in the colormap. Alias: lineColour2 |
Examples
editimg = imageRead("https://dev.lucee.org/uploads/default/original/2X/6/63711fa0d32b7ebd71a71286b77aa555c8d034fa.jpeg");
filter = "life";
map = ImageFilterColorMap(type="spectrum");
params = {
colormap: map,
iterations: 20,
newColor: "990000",
};
ImageFilter(image = img, filtername = filter, parameters = params);
imageWriteToBrowser(img);
See also
- Image manipulation
- image.filterColorMap()
- Search Issue Tracker open_in_new
- Search Lucee Test Cases open_in_new (good for further, detailed examples)