-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Refactor and redesign ImageEditor
component
#10635
base: main
Are you sure you want to change the base?
Conversation
Anyway you can do two things:
You cannot do both. My main question is the interplay between crop and resize. Should crop refocus on the resized image? It probably should since it is an image crop.
|
The python API won't do anything and I don't expect it to work with gradio right now, just dealing with finalising the UI work. |
🦄 change detectedThis Pull Request includes changes to the following packages.
With the following changelog entry.
Maintainers or the PR author can modify the PR title to modify this entry.
|
@pngwn I wasn't able to do a lot of testing since the image upload and drawing features are the broken state, even separately for me: ![]()
I agree, and just to confirm, cropping can be undo-ed?
I'm not sure which menu UIs we are referring to? Can you elaborate or share a screenshot? |
Ah, that is slightly more broken than intended but I see the issue locally too. I'll repost with more clarity shortly. |
@hannahblair I will consider your request. Jk, yeah I'll change that! |
Very very cool @pngwn! Just going through and testing, I noticed a few things:
Screen.Recording.2025-03-07.at.1.56.11.PM.mov
![]()
![]() The alt text says maximize but it seems to have no effect. If it's really maximizing the input image, then I suggest moving it to the zoom toolbar.
![]()
Actually interestingly, after you upload an image right now, the tool doesn't change, but you have the ability to draw on the uploaded image. However, this drawing is very jerky and buggy. Only when you actually click on the draw tool can you draw reliably, see this: Screen.Recording.2025-03-07.at.2.18.24.PM.mov(still testing...) |
Love the erasing UX! Screen.Recording.2025-03-07.at.2.28.23.PM.mov |
(5) The cropping and resizing don't apply to the annotations. Is that expected? I would have expected everything to be cropped/resized: Screen.Recording.2025-03-07.at.2.39.44.PM.mov(you'll also notice a flaky behavior the first time the cropping tool was used). The code here is just: import gradio as gr
with gr.Blocks() as demo:
with gr.Row():
ie = gr.ImageEditor()
io = gr.Image()
b = gr.Button()
b.click(lambda x: x["composite"], ie, io)
demo.launch() |
The zooming works great, exactly as expected |
This is a not working draft of the image editor. I had it half working until i let o3 run wild and then i broke everything.
o3 has done more to set this country back than Margaret Thatcher.