@bitpatty/imgproxy-url-builder
Version:
A TypeScript helper library for building imgproxy URLs
41 lines (40 loc) • 966 B
TypeScript
/**
* The trim options
*/
type TrimOptions = {
/**
* The color similarity tolerance
*/
threshold: number;
/**
* The (hex-encoded) color to cut off
*/
color?: string;
/**
* Equalize the horizontal or vertical
* trimming distance
*/
equal?: {
/**
* If true, equalizes the trimming distance
* on the horizontal axis
*/
horizontal?: boolean;
/**
* If true, equalizes the trimming distance
* on the vertical axis
*/
vertical?: boolean;
};
};
/**
* Trims the image background.
*
* See https://github.com/imgproxy/imgproxy/blob/6f292443eafb2e39f9252175b61faa6b38105a7c/docs/generating_the_url.md#trim for the imgproxy documentation
*
* @param options The trimming options
* @returns The trim param string
*/
declare const trim: (options: TrimOptions) => string;
export default trim;
export { TrimOptions };