Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
microsoft
GitHub Repository: microsoft/vscode
Path: blob/main/src/vs/platform/imageResize/common/imageResizeService.ts
3296 views
1
/*---------------------------------------------------------------------------------------------
2
* Copyright (c) Microsoft Corporation. All rights reserved.
3
* Licensed under the MIT License. See License.txt in the project root for license information.
4
*--------------------------------------------------------------------------------------------*/
5
6
import { createDecorator } from '../../instantiation/common/instantiation.js';
7
8
export const IImageResizeService = createDecorator<IImageResizeService>('imageResizeMainService');
9
10
11
export interface IImageResizeService {
12
13
readonly _serviceBrand: undefined;
14
15
/**
16
* Resizes an image to a maximum dimension of 768px while maintaining aspect ratio.
17
*/
18
resizeImage(data: Uint8Array | string, mimeType?: string): Promise<Uint8Array>;
19
}
20
21