A set of functions which can be used to display images in different ways.
How it works
This filter and its variants can be applied to:
- _metrics whose value is an URL or a byte-encoded image.
- _properties whose value is an URL or the property type is FILE.
Null or empty values will generate an empty image.
The panzoom option can be used to display a small image preview, and when the image is clicked a popup will display the full-size image with also pan and zooming features.
Filter Variants
The set of predefined filter variants that can be used to format values.
image | |
---|---|
Displays an image without any scaling Supported Input Types: STRING | FILE Output Type: HTML |
image_panzoom | |
---|---|
Displays an image (width 256px) allowing also mouse pan and zooming. Supported Input Types: STRING | FILE Output Type: HTML |
image_w128 | |
---|---|
Displays an image by scaling its width to 128px. Supported Input Types: STRING | FILE Output Type: HTML |
image_w256 | |
---|---|
Displays an image by scaling its width to 256px. Supported Input Types: STRING | FILE Output Type: HTML |
image_w64 | |
---|---|
Displays an image by scaling its width to 64px. Supported Input Types: STRING | FILE Output Type: HTML |
image_bitmap_to_png | |
---|---|
Displays an image obtained by converting a bitmap encoded string to a Base64 PNG. Supported Input Types: STRING | FILE Output Type: HTML |
image_w32 | |
---|---|
Displays an image by scaling its width to 32px. Supported Input Types: STRING | FILE Output Type: HTML |
Configuration Options
New variants can be defined through the following configuration options.
Option | Description | Sample Value |
---|---|---|
panzoom | The flag indicating whether the pan and zooming function are enabled (default false). | {"panzoom": true} |
width | The image desired width expressed in pixels or percentage (default 100%). | {"width": "256px"} |
converter | The image converter to be applied before visualization (default none). | {"converter": "BITMAP_TO_PNG"} |
Example of defining a custom image filter variant:
exports.image_w128 = ImageViewerFilter({ "width": "128px" });
Comments
0 comments
Please sign in to leave a comment.