本文整理匯總了TypeScript中@ephox/imagetools.ImageTransformations類的典型用法代碼示例。如果您正苦於以下問題:TypeScript ImageTransformations類的具體用法?TypeScript ImageTransformations怎麽用?TypeScript ImageTransformations使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
在下文中一共展示了ImageTransformations類的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: then
then(function (ir) {
ImageTransformations.crop(ir, rect.x, rect.y, rect.w, rect.h).
then(imageResultToBlob).
then(function (blob) {
addBlobState(blob);
cancel();
});
});
示例2: selectedImageOperation
return selectedImageOperation(editor, imageUploadTimerState, function (imageResult) {
const size = ImageSize.getImageSize(getSelectedImage(editor));
if (size) {
ImageSize.setImageSize(getSelectedImage(editor), {
w: size.h,
h: size.w
});
}
return ImageTransformations.rotate(imageResult, angle);
})();
示例3: selectedImageOperation
return selectedImageOperation(editor, imageUploadTimerState, function (imageResult) {
return ImageTransformations.flip(imageResult, axis);
})();
示例4:
const makeColorTransform = (red: number, green: number, blue: number): ((ir: ImageResult) => Promise<ImageResult>) => (ir: ImageResult): Promise<ImageResult> => ImageTransformations.colorize(ir, red, green, blue);