mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-16 17:46:59 +00:00
While Crop Image shows its box, the Control bar has a PPI list (72, 96, 150, 200 and 300 ppi, with the ones above the image's own disabled) and a PPI field, a reference point that X and Y name and that W and H resize about, and a link icon that keeps W and H in proportion. A linked size that would not fit the image is reduced with the other side in proportion. object.cropImage takes ppi: the cut pixels are resampled to it, with colors weighted by their alpha, and the image keeps the box's size. A box over the whole image with a new ppi only resamples it, and an image scaled differently across and down comes out with square pixels. ppi is refused outside 1 to 2400, above the image's own resolution (300 ppi for a linked image), and with trim. tool.setOption sets ppi, reference and linked for the Crop Image tool and refuses values it can't use. Docs: docs/mcp.md, docs/target-app-parity.md.