Comments (2)
@pngwn you are awesome thank you so much
from gradio.
Hello, this is possible today.
You can take the background image and save it to disk (or process it), then you can take the 'layers', combine them into a single image by overlaying the opaque pixels and convert them all to a uniform grey value.
I am created a space demonstrating this here:
https://huggingface.co/spaces/pngwn/gradio-imageeditor-combine-masks
This creates a single uniform grey mask, regardless of the colors used by the users and regardless of how many separate layers they use.
This example uses numpy but the same effect can be achieved (more simply) with PIL. The numpy variant is more performant though.
from gradio.
Related Issues (20)
- Frontend got connection error after screenlock on Windows 11
- npm package has been stomped by something unrelated HOT 1
- Can Gradio actively modify the State of a session based on its unique identifier? HOT 5
- DataFrame组件增加新需求申请 HOT 2
- OAuth (Sign In With Hugging Face) Not Working in Spaces (Too Many Redirects) HOT 1
- Cannot load file or recording into Audio component. HOT 1
- Image control: drop to replace.
- changing the prompt for image uploading in the Image object
- Login Form Customization.
- Additional Authentication process. HOT 1
- chatbot components
- How to implement two-step update for gradio.Chatbot? HOT 2
- prism is highlighting code of whole page when embedded. HOT 1
- Cannot upload files from an iPhone
- Gradio's server memory resources cannot be automatically released HOT 1
- Gr.Microphone uses the microphone at all time even when you're not recording.
- A Bug in Document HOT 3
- website formatting bug - wandB integration page
- Add ability to save prompts with chatinterface HOT 6
- Issue with gr.ImageEditor in Gradio Application
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gradio.