# Photo Crop & Resize Planner > Plan a precise crop and output size before resizing a photo. Calculate a centered crop, final pixel dimensions and scale for a target box. Fit keeps the whole image; fill crops to the requested aspect ratio. Upscaling is optional. Part of usefulweb.app (https://usefulweb.app/). Results are deterministic calculations from the inputs and the listed assumptions; the API returns exactly what the web page shows. ## Use it - Human interface: https://luminaresizeplanner.usefulweb.app/ (interactive tool at https://luminaresizeplanner.usefulweb.app/tool) - JSON API: POST https://luminaresizeplanner.usefulweb.app/api/v1/calculate with a JSON object of inputs (schema: https://luminaresizeplanner.usefulweb.app/api/v1/tool) - OpenAPI: https://luminaresizeplanner.usefulweb.app/openapi.json - MCP (Streamable HTTP): https://luminaresizeplanner.usefulweb.app/mcp - tool `lumina_resize_planner` ## Inputs - width (integer): Source width (px) - height (integer): Source height (px) - targetWidth (integer): Target width (px) - targetHeight (integer): Target height (px) - mode (select): Fit mode - upscale (boolean): Allow enlargement ## Method - Fit uses the smaller target/source scale; fill uses the larger one and a centered crop. - When enlargement is disabled, scale is capped at 1. Pixel coordinates and output dimensions are rounded to whole pixels.