MCPcopy Create free account
hub / github.com/idosal/git-mcp / BasicImageTransformations

Interface BasicImageTransformations

worker-configuration.d.ts:3892–3952  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3890 aiSearch(params: AutoRagAiSearchRequest): Promise<AutoRagAiSearchResponse | Response>;
3891}
3892interface BasicImageTransformations {
3893 /**
3894 * Maximum width in image pixels. The value must be an integer.
3895 */
3896 width?: number;
3897 /**
3898 * Maximum height in image pixels. The value must be an integer.
3899 */
3900 height?: number;
3901 /**
3902 * Resizing mode as a string. It affects interpretation of width and height
3903 * options:
3904 * - scale-down: Similar to contain, but the image is never enlarged. If
3905 * the image is larger than given width or height, it will be resized.
3906 * Otherwise its original size will be kept.
3907 * - contain: Resizes to maximum size that fits within the given width and
3908 * height. If only a single dimension is given (e.g. only width), the
3909 * image will be shrunk or enlarged to exactly match that dimension.
3910 * Aspect ratio is always preserved.
3911 * - cover: Resizes (shrinks or enlarges) to fill the entire area of width
3912 * and height. If the image has an aspect ratio different from the ratio
3913 * of width and height, it will be cropped to fit.
3914 * - crop: The image will be shrunk and cropped to fit within the area
3915 * specified by width and height. The image will not be enlarged. For images
3916 * smaller than the given dimensions it's the same as scale-down. For
3917 * images larger than the given dimensions, it's the same as cover.
3918 * See also trim.
3919 * - pad: Resizes to the maximum size that fits within the given width and
3920 * height, and then fills the remaining area with a background color
3921 * (white by default). Use of this mode is not recommended, as the same
3922 * effect can be more efficiently achieved with the contain mode and the
3923 * CSS object-fit: contain property.
3924 * - squeeze: Stretches and deforms to the width and height given, even if it
3925 * breaks aspect ratio
3926 */
3927 fit?: "scale-down" | "contain" | "cover" | "crop" | "pad" | "squeeze";
3928 /**
3929 * When cropping with fit: "cover", this defines the side or point that should
3930 * be left uncropped. The value is either a string
3931 * "left", "right", "top", "bottom", "auto", or "center" (the default),
3932 * or an object {x, y} containing focal point coordinates in the original
3933 * image expressed as fractions ranging from 0.0 (top or left) to 1.0
3934 * (bottom or right), 0.5 being the center. {fit: "cover", gravity: "top"} will
3935 * crop bottom or left and right sides as necessary, but won’t crop anything
3936 * from the top. {fit: "cover", gravity: {x:0.5, y:0.2}} will crop each side to
3937 * preserve as much as possible around a point at 20% of the height of the
3938 * source image.
3939 */
3940 gravity?: 'left' | 'right' | 'top' | 'bottom' | 'center' | 'auto' | 'entropy' | BasicImageTransformationsGravityCoordinates;
3941 /**
3942 * Background color to add underneath the image. Applies only to images with
3943 * transparency (such as PNG). Accepts any CSS color (#RRGGBB, rgba(…),
3944 * hsl(…), etc.)
3945 */
3946 background?: string;
3947 /**
3948 * Number of degrees (90, 180, 270) to rotate the image by. width and height
3949 * options refer to axes after rotation.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected