Image Rendering Script
In this article: An image rendering script allows you to use a script to render an image format which is not supported by the built-in image renderers. Each image rendering script defines a custom image format along with the script which renders it, and the format will be listed in the format drop-down field just like the built-in formats. Image rendering scripts are supported by PixelViewer 2026.1 and later.Creating and Managing
There are 2 ways to open dialog to manage image rendering scripts:Through Tools Menu
Windows/Linux Users
- Click
at right hand side of toolbar. - Click 'Tools > Manage Image Rendering Scripts…' in menu.
macOS Users
- Click 'Tools > Manage Image Rendering Scripts…' in menu at top of screen.
Through Rendering Parameters Panel
- Find the drop-down field of image format in 'Rendering parameters' panel.
- Click [Create Script…] below the drop-down field.
Defining the Format
Besides the script itself, the following are defined by each image rendering script:-
Name
The name of the format shown in the drop-down field of image format.
-
Output Color Format
The format of the bitmap buffer which the script writes rendered pixels into. It can be Bgra32 (8-bit for each color component) or Bgra64 (16-bit for each color component).
-
Selectable Byte Ordering
Whether the byte ordering of source image data can be selected by user or not.
-
Adjustable Color Pre-Correction
Whether the gains of red, green and blue color can be adjusted by user or not.
-
Planes
One or more planes of the format. The following are defined by each plane:
-
Pixel-Stride
The number of bytes of each pixel of the plane. Set to 0 means that pixels of the plane are packed in bits instead of bytes.
-
Effective Bits
The minimum and maximum number of effective bits of each pixel of the plane, which can be selected by user.
-
Adjustable B/W Levels
Whether the black level and white level of the plane can be adjusted by user or not.
-
Pixel-Stride
Scripting Basics
Please refer to Scripting in Application for the basics of scripting. Unlike the other types of script, an image rendering script runs on a background thread every time when the image needs to be rendered. Therefore, interacting with user is not supported inside an image rendering script.Languages
You can use the following languages to create Image Rendering Scripts:Writing with an AI Tool
You can let an AI tool write the script for you. The Skill below teaches it the API of image rendering scripts. It produces the script along with the settings to enter in the editor, which you copy into PixelViewer yourself. Please refer to Installing Skills for AI Tools to install it.
The AI tool cannot access PixelViewer. It only writes the script and tells you which settings to use.
A script is not sandboxed and runs with the same permission as PixelViewer. Please read and understand a script generated by an AI tool before enabling script execution.