-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
wip: Image Cropper #5857
wip: Image Cropper #5857
Conversation
Not just in the ControlImage panel
minor bugs with aspect ratio. will fix soon
Had a play, some notes:
All said, I think much of this functionality is fairly straightforward to implement with Konva. Check out this demo that is a good amount of the way towards the needed functionality: https://konvajs.org/docs/select_and_transform/Basic_demo.html We can make the image a transformable shape with a single rect that acts at the crop box. Using konva we can also support zoom without resizing the image output. |
What type of PR is this? (check all applicable)
Have you discussed this change with the InvokeAI team?
Have you updated all relevant documentation?
Description
This PR adds
Crop Image
to the UI. Right click on any image anywhere and access theCrop
interface.The
Crop
UI allows you to crop and save the cropped version. This is especially handy if you only want to keep some parts of the image but more importantly for stuff like IP Adapter which generally require a512x512
image.TODO
Testing
Uses
CropperJS
so you will need to dopnpm install
once before running to install the required libraries.95% done.