Skip to content
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

The sketch mode of gr.Image require more support. #2030

Closed
HuangChiEn opened this issue Aug 17, 2022 · 2 comments · Fixed by #2144
Closed

The sketch mode of gr.Image require more support. #2030

HuangChiEn opened this issue Aug 17, 2022 · 2 comments · Fixed by #2144
Assignees
Labels
enhancement New feature or request

Comments

@HuangChiEn
Copy link

HuangChiEn commented Aug 17, 2022

As the title described, I have tried to setup the gr.Image(tool='sketch') as follows :
image

The web exactly supports the sketch-pen for us as follows :
image

However, I believe someone discover the problem, the default sketch-pen extremely bold and the corresponding color is transparency white, which is barely visualize in the image.

Does it have any support for this method for adjusting the sketch-pen bold shape, such as shape=(7, 7) and the color picker of sketch-pen?

What I have tried :

I have tried the following setup for gr.Image
image

As expected, it doesn't work. The sketch-pen is still extremely bold..

What worse

For the default setup of scratchpad mode image_mode="L", source="canvas", shape=(28, 28), invert_colors=True, the shape can be adjusted by shape=(7, 7).
image

the setup code
image

Any suggestion and feedback will be appreciated!!

@pngwn
Copy link
Member

pngwn commented Aug 24, 2022

The shape kwarg doesn't control the brush. However this is being worked on.

The weird scaling on the brush is a bug, the ability to resize it is a feature that we will be adding (as well as selecting an appropriate default size depending on the cavas size).

@HuangChiEn
Copy link
Author

thanks for your reply ~
then we look forward to the solution of it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants