new ImageParams()
This data structure holds all parameters used in image requests. The default values initialized by the constructor are not recommended, the context should provide a factory function for default construction.
The image compose process goes as follows.
- Image is rendered to it's native resolution
- Image is scaled according to scaled_width and scaled_height
- Image is cropped according to cropped_width and cropped_height
- Image is auto cropped if auto_crop is set
- Image is saved
Note that a "0" in scaled_width, scaled_height, cropped_width or cropped_height means that it will use the "native/source" value for that dimension. If auto_crop is set however, and exactly one of scaled_width or scaled_height is set to "0", the "0" will be replaced with a value that keeps the source aspect ratio.
- Source:
Members
auto_crop :boolean
Automatically crops the image of all bordering "empty" pixels
Type:
- boolean
- Source:
bg_color_hex :string
Specifies the color of the background. Should be a hexadecimal string representing the color.
Type:
- string
- Source:
crop_x_ratio :number
Distribution of the cropped pixels along the X axis (0 = Crop right, 0.5 = Equal, 1 = Crop left)
Type:
- number
- Source:
crop_y_ratio :number
Distribution of the cropped pixels along the Y axis (0 = Crop bottom, 0.5 = Equal, 1 = Crop top)
Type:
- number
- Source:
cropped_height :number
Height of image after crop
Type:
- number
- Source:
cropped_width :number
Width of image after crop
Type:
- number
- Source:
file_type :string
Type of image (png or jpg)
Type:
- string
- Source:
frame :number
Index for the frame/angle
Type:
- number
- Source:
keep_aspect_ratio :boolean
Keep aspect ratio (set any of scaled_width or scaled_height in order for it to have any effect)
Type:
- boolean
- Source:
only_use :Array.<string>
The only items that should contribute to the image
Type:
- Array.<string>
- Source:
only_use_groups :Array.<string>
The only item groups that should contribute to the image
Type:
- Array.<string>
- Source:
scaled_height :number
Height that the rendered image should be scaled to
Type:
- number
- Source:
scaled_width :number
Width that the rendered image should be scaled to
Type:
- number
- Source:
serie_name :string
Name of the series to be used (EXTERIOR or INTERIOR in most cases)
Type:
- string
- Source:
skip :Array.<string>
Items that should not contribute to the image (S-TENT is often set here)
Type:
- Array.<string>
- Source:
skip_groups :Array.<string>
Itemgroups that should not contribute to the image
Type:
- Array.<string>
- Source:
use_hd :boolean
Use HD material
Type:
- boolean
- Source: