Skip to content

feat: FlexCrop clip edges in composition pixels - #123

Open
J160KU wants to merge 7 commits into
0xsline:mainfrom
J160KU:j160ku/flexcrop
Open

feat: FlexCrop clip edges in composition pixels#123
J160KU wants to merge 7 commits into
0xsline:mainfrom
J160KU:j160ku/flexcrop

Conversation

@J160KU

@J160KU J160KU commented Aug 27, 2026

Copy link
Copy Markdown

Summary

  • FlexCrop: Kdenlive-style Crop Left / Right / Top / Bottom under Clip properties → Basic → Transform (below Corner). Cropped pixels are fully transparent.
  • Inspector and edit_item transform.crop / transform.flexCrop use composition pixels (left/right 0…canvas width, top/bottom 0…canvas height). Storage stays a 0–1 canvas fraction. transform.crop: null clears crop.
  • Documents the feature in CHANGELOG.md [Unreleased], a Clip crop section at the top of README.md / README_ZH.md, and the generated agent tool catalog.

Replaces #122 (same commits; branch renamed j160ku/clip-crop-inspectorj160ku/flexcrop).

FlexCrop inspector: preview edges 1–4 match Crop Left, Crop Right, Crop Top, and Crop Bottom

Test plan

  • Select a video or image clip → Clip properties → Basic → Transform → Crop Left/Right/Top/Bottom; confirm values are px and the preview checkerboard shows through cropped edges.
  • Drag opposite edges toward each other and confirm a minimum remaining span (clip does not invert).
  • Agent / MCP: edit_item with transform.crop: { left: 240 } (pixels, not percent); transform.crop: null clears.
  • tsx src/editor/clipCrop.verify.ts, tsx src/agent/tools/edit-item-generic.verify.ts, tsx src/components/inspector/inspector-controls.verify.ts

Made with Cursor

J160KU and others added 7 commits August 27, 2026 18:53
Add Kdenlive-style Crop Left/Right/Top/Bottom sliders and edit_item transform.crop so users and the in-app agent can trim clip edges with 1px precision.

Co-authored-by: Cursor <cursoragent@cursor.com>
Keep a small J160KU credit at the README footer without a banner.

Co-authored-by: Cursor <cursoragent@cursor.com>
Add an Unreleased changelog entry, a Clip crop section at the top of both READMEs, and refresh the agent tool catalog so edit_item transform.crop is documented.

Co-authored-by: Cursor <cursoragent@cursor.com>
Keep the FlexCrop PR from replacing OpenChatCut's README; clip crop notes stay in FLEXCROP.md.

Co-authored-by: Cursor <cursoragent@cursor.com>
Keep the FlexCrop PR from replacing OpenChatCut's Chinese README; clip crop notes stay in FLEXCROP.md.

Co-authored-by: Cursor <cursoragent@cursor.com>
The preview wrapper uses the stage content box and one composition scale so
Remotion does not letterbox on Y under the overlay; rotation stays centered.

Co-authored-by: Cursor <cursoragent@cursor.com>
Inspector open/close recenters the preview canvas; overlay-relative
pointer math looked like spurious drags. Track clientX/clientY and map
through the live canvas rect on each move.

Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant