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
- Source:
Type:
-
boolean
bg_color_hex :string
Specifies the color of the background. Should be a hexadecimal string representing the color.
- Source:
Type:
-
string
crop_x_ratio :number
Distribution of the cropped pixels along the X axis (0 = Crop right, 0.5 = Equal, 1 = Crop left)
- Source:
Type:
-
number
crop_y_ratio :number
Distribution of the cropped pixels along the Y axis (0 = Crop bottom, 0.5 = Equal, 1 = Crop top)
- Source:
Type:
-
number
keep_aspect_ratio :boolean
Keep aspect ratio (set any of scaled_width or scaled_height in order for it to have any effect)
- Source:
Type:
-
boolean
only_use :Array.<string>
The only items that should contribute to the image
- Source:
Type:
-
Array.<string>
only_use_groups :Array.<string>
The only item groups that should contribute to the image
- Source:
Type:
-
Array.<string>
scaled_height :number
Height that the rendered image should be scaled to
- Source:
Type:
-
number
scaled_width :number
Width that the rendered image should be scaled to
- Source:
Type:
-
number
serie_name :string
Name of the series to be used (EXTERIOR or INTERIOR in most cases)
- Source:
Type:
-
string
skip :Array.<string>
Items that should not contribute to the image (S-TENT is often set here)
- Source:
Type:
-
Array.<string>
skip_groups :Array.<string>
Itemgroups that should not contribute to the image
- Source:
Type:
-
Array.<string>