askui
Version:
Reliable, automated end-to-end-testing that depends on what is shown on your screen instead of the technology you are running on
13 lines (12 loc) • 684 B
TypeScript
import { ResizedImage } from './resized-image-interface';
/**
* Resizes a base64image only when the height or the width is bigger than the maxEdge Param,so that
* the returned image keeps the same aspect ratio but have a max size equal to the threshold.
*
* @param {string} base64ImageString - A base64 encoded image
* @param {number} maxEdge - A max image height or width, if excceded, the image will be resized
*
* @returns {Promise<ResizedImage>} ResiziedImage Interface,
* the true pixel values = controlui-api response * resizeRatio.
*/
export declare function resizeBase64ImageWithSameRatio(base64ImageString: string, maxEdge?: number): Promise<ResizedImage>;