import { Media } from './Media'; import { ImageFormat } from './model/ImageFormat'; /** * Utility which helps construct URLs to image resources hosted using the Amplience Dynamic Media platform. * * Commonly used transformations can chained together by calling the appropriate function on the builder. * Advanced transformations can be used by configuring a transformation template within the Amplience * back-office and applying the template to the builder. */ export declare class ImageUrlBuilder { private readonly media; private _protocol; private _host; private _format; private _seoFileName; private readonly _query; constructor(media: Media); /** * Protocol configures what protocol style to use when building the image URL. * * ```{{protocol}}[:]//images.site.com/i/account/image``` * @param value URL protocol, valid values are: http, https and // for protocol relative URLs */ protocol(value: string): this; /** * Host configures the hostname to use when building the image URL. * By default, the SDK will use the most appropriate hostname based on * the SDK configuration. * * ```https://{{host}}/i/account/image``` * @param value Hostname to use instead of the default value. */ host(value: string): this; /** * Format converts the image to the file format specified. * The format will be appended to the URL as a file extension. * * ```https://images.site.com/i/account/image.webp``` * @param value Images format to use when encoding the output. */ format(value: ImageFormat): this; /** * SEO filename allows a custom filename to be used to improve SEO. * * ```https://images.site.com/i/account/image/{{seoFileName}}``` * @param value */ seoFileName(value: string): this; /** * Template applies a transformation template to the image, which will * apply all of the transformation parameters contained in the template to the image. * * ```https://images.site.com/i/account/image?${{name}}$``` * @param name The name of the transformation template previously configured in the Amplience back-office. */ template(name: string): this; /** * Parameter appends the specified parameter to the query string. This can be used to * pass variables into templates. * * ```https://images.site.com/i/account/image?{{name}}={{value}}``` * @param name * @param value */ parameter(name: string, value: string): this; /** * Quality sets the compression level for the image output * * ```https://images.site.com/i/account/image?qlt={{value}}``` * @param value The quality percentage (0-100) */ quality(value: number): this; /** * Sharpen applies an unsharp mask to the image to refine edges or make an image look more crisp. * * ```https://images.site.com/i/account/image?unsharp={{radius}},{{sigma}},{{amount}},{{threshold}}``` * * @param radius The radius of the Gaussian, in pixels, not counting the center pixel. * @param sigma The standard deviation of the Gaussian, in pixels. * @param amount The percentage of the difference between the original and the blur image that is added back into the original. * @param threshold The threshold, as a fraction of MaxRGB, needed to apply the difference amount. */ sharpen(radius?: number, sigma?: number, amount?: number, threshold?: number): this; /** * Width resizes an image to the pixel size provided. If you only provide one axis, * the other will be calculated to maintain aspect ratio. Use the scale mode parameter * to apply different resize effects like stretch or crop. * * ```https://images.site.com/i/account/image?w={{value}}``` * @param value The new width in pixels. */ width(value: number): this; /** * Height resizes an image to the pixel size provided. If you only provide one axis, * the other will be calculated to maintain aspect ratio. Use the scale mode parameter * to apply different resize effects like stretch or crop. * * ```https://images.site.com/i/account/image?h={{value}}``` * @param value The new height in pixels. */ height(value: number): this; /** * Returns the fully constructed URL for this image with any transformations. */ build(): string; }