diff --git a/backend/src/types/image.ts b/backend/src/types/image.ts new file mode 100644 index 0000000..30dd76f --- /dev/null +++ b/backend/src/types/image.ts @@ -0,0 +1,23 @@ +export type OutputFormat = "png" | "webp" | "jpeg"; + +export type FitMode = "inside" | "outside" | "cover" | "contain"; + +export type CropPosition = + | "center" + | "top" + | "right" + | "bottom" + | "left" + | "top-left" + | "top-right" + | "bottom-left" + | "bottom-right"; + +export interface TransformRequest { + width?: number; + height?: number; + quality?: number; + format?: OutputFormat; + fit?: FitMode; // "inside" = resize only, "cover" = crop to fill + position?: CropPosition; // crop anchor when using cover +} \ No newline at end of file