Vector kit command

image.info

Image Info

Answers an image object's link, colour mode, pixel size, resolution and placed size.

Kit
Vector 0.1.0 (.kvector)
Changes the document
no
Acts on
id (one id), which a run step’s on fills

Parameters

Parameters of image.info
NameTypeRequiredDescription
dxfobjectnoread by the command beside its listed parameters
idintegernoobject ID
linkbooleannoread by the command beside its listed parameters
pageintegernoread by the command beside its listed parameters
thumbnailnumbernoread by the command beside its listed parameters

Call through vector_run

text
vector_run {
  "path": "<file>.kvector",
  "steps": [{ "command": "image.info" }]
}

The required parameters, with placeholders for their types: not a tested example. Optional: dxf, id, link, page, thumbnail. vector_run answers the step’s result in completed[i].result.

Result

Result of image.info
NameTypeRequiredDescription
colorModeanyno
heightanyno
idanyno
linkanyno
linkedanyno
nameanyno
pixelHeightanyno
pixelWidthanyno
ppiany[]no
widthanyno
Result JSON Schema
json
{
  "additionalProperties": true,
  "properties": {
    "colorMode": {},
    "height": {},
    "id": {},
    "link": {},
    "linked": {},
    "name": {},
    "pixelHeight": {},
    "pixelWidth": {},
    "ppi": {
      "type": "array"
    },
    "width": {}
  },
  "type": "object"
}

Parameter schema

json
{
  "additionalProperties": false,
  "properties": {
    "dxf": {
      "additionalProperties": true,
      "description": "read by the command beside its listed parameters",
      "type": "object"
    },
    "id": {
      "description": "object ID",
      "type": "integer",
      "x-khp-types": [
        "Node"
      ]
    },
    "link": {
      "description": "read by the command beside its listed parameters",
      "type": "boolean"
    },
    "page": {
      "description": "read by the command beside its listed parameters",
      "type": "integer"
    },
    "thumbnail": {
      "description": "read by the command beside its listed parameters",
      "type": "number"
    }
  },
  "returns": "{id, name, linked, link, colorMode: RGB|Grayscale|CMYK, pixelWidth, pixelHeight, ppi: [x, y] at its placed size, width, height}",
  "type": "object"
}

Generated from the command list of @kition/[email protected] and the kit itself (vector_commands through @kition/[email protected], built from KitionAI/kition-vector@7cf908f). As data: commands.jsonl.