Quality Settings - carstenschaefer/ImagerJs GitHub Wiki
Provides image scaling.
Configuration
quality: {
sizes: [
{ label: 'Original', scale: 1, quality: 1, percentage: 100 },
{ label: 'Large', scale: 0.5, quality: 0.5, percentage: 50 },
{ label: 'Medium', scale: 0.2, quality: 0.2, percentage: 20 },
{ label: 'Small', scale: 0.05, quality: 0.05, percentage: 5 }
],
allowCustomSetting: true
}
- Optional setting. If not specified, the settings shown in the example will be used.
- It's possible to use as many items as wanted:
label: Name of quality setting. Names should match in case you have defined a translation in translation file.
scale: Scale of quality setting (decimal). Must correspond with quality and percentage.
quality: Quality of quality setting (decimal). Must correspond with scale and percentage.
percentage: Percentage of quality setting (integer). Must correspond with scale and quality.
allowCustomSetting:
- Optional setting. If not specified, the settings shown in the example will be used.
- If set to
true a user can use custom settings for image scaling using a numeric textbox.
- If set to
false no custom entry is shown.