---
title: "image.imageSize: Image Size… — Photo kit command — Kition"
description: "Resizes the whole image to `width`×`height` px and/or `resolution` ppi, resampling pixels with `resample` (none changes only the ppi); every layer scales."
canonical: "https://developer.kition.ai/docs/kits/photo/commands/image.imageSize"
---

> Canonical HTML: [https://developer.kition.ai/docs/kits/photo/commands/image.imageSize](https://developer.kition.ai/docs/kits/photo/commands/image.imageSize)

# image.imageSize

**Image Size….** Resizes the whole image to `width`×`height` px and/or `resolution` ppi, resampling pixels with `resample` (none changes only the ppi); every layer scales.

- Kit: Photo 0.1.0 (PSD, PSB, or .kphoto); reference: [Photo kit commands](https://developer.kition.ai/docs/kits/photo.md)
- Changes the document: yes

## Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `coalesce` | `string` | no | Merges consecutive edits with the same key into one undo step, as a slider drag or a typing session is one. |
| `height` | `number (≥ 1, ≤ 300000)` | no | Pixels; the resulting canvas side is rounded and clamped to 1..300000. With relative canvas sizing this parameter is a delta. |
| `resample` | `"bicubic" \| "bilinear" \| "nearest" \| "lanczos" \| "preserveDetails" \| "none"` | no |  |
| `resolution` | `number (≥ 1, ≤ 10000)` | no | Pixels per inch, clamped to 1..10000. |
| `width` | `number (≥ 1, ≤ 300000)` | no | Pixels; the resulting canvas side is rounded and clamped to 1..300000. With relative canvas sizing this parameter is a delta. |

## Call through photo_run

```text
photo_run {
  "path": "<file>.psd",
  "steps": [{ "command": "image.imageSize" }]
}
```

The required parameters, with placeholders for their types: not a tested example. Optional: `coalesce`, `height`, `resample`, `resolution`, `width`. photo_run answers the step’s result in `completed[i].result`.

## Result

The kit gives no result schema for this command.

## Parameter schema

```json
{
  "additionalProperties": false,
  "properties": {
    "coalesce": {
      "description": "Merges consecutive edits with the same key into one undo step, as a slider drag or a typing session is one.",
      "type": "string"
    },
    "height": {
      "description": "Pixels; the resulting canvas side is rounded and clamped to 1..300000. With relative canvas sizing this parameter is a delta.",
      "maximum": 300000,
      "minimum": 1,
      "type": "number"
    },
    "resample": {
      "default": "bicubic",
      "enum": [
        "bicubic",
        "bilinear",
        "nearest",
        "lanczos",
        "preserveDetails",
        "none"
      ],
      "type": "string"
    },
    "resolution": {
      "description": "Pixels per inch, clamped to 1..10000.",
      "maximum": 10000,
      "minimum": 1,
      "type": "number"
    },
    "width": {
      "description": "Pixels; the resulting canvas side is rounded and clamped to 1..300000. With relative canvas sizing this parameter is a delta.",
      "maximum": 300000,
      "minimum": 1,
      "type": "number"
    }
  },
  "returns": "{width,height} (the document's size after the command; \"none\" changes the resolution only)",
  "type": "object"
}
```

Generated from the command list of @kition/photo-darwin-arm64@0.1.0 and the kit itself (photo_commands through @kition/cli@0.1.1, built from KitionAI/kition-photo@abe3f30).
