Comments (5)
How are your imports looking? Can you share the complete script?
from pilgram2.
env
google colab
code (undocumented about brightness but work, see pic above)
!wget -c 'https://i.ytimg.com/vi/vEYsdh6uiS4/maxresdefault.jpg'
pip install -U pilgram2 matplotlib pillow
from PIL import Image
from google.colab import files, drive
import matplotlib.pyplot as plt
import pilgram2
import pilgram2.css
import pilgram2.css.blending
ori_img = 'maxresdefault.jpg'
im = Image.open(ori_img)
filtered_css_img = 'brightness.png'
pilgram2.css.brightness(im).save(filtered_css_img)
fig = plt.figure(figsize = (22, 22) )
plt.subplot(1, 2, 1)
plt.title("original")
plt.imshow(im)
plt.subplot(1, 2, 2)
plt.title("brightness")
image0 = plt.imread(filtered_css_img)
plt.imshow(image0)
code that not work above
!wget -c 'https://i.ytimg.com/vi/vEYsdh6uiS4/maxresdefault.jpg'
pip install -U pilgram2 matplotlib pillow
from PIL import Image
from google.colab import files, drive
import matplotlib.pyplot as plt
import pilgram2
import pilgram2.css
import pilgram2.css.blending
ori_img = 'maxresdefault.jpg'
im = Image.open(ori_img)blended_img = 'alpha.png'
filtered = Image.open(filtered_img)
filtered_css = Image.open(filtered_css_img)
pilgram2.css.blending.alpha(filtered, filtered_css).save(blended_img)
best regards
from pilgram2.
pilgram2.css.blending.alpha
is the internal method that is used.
For external use you need to use one of the other methods that describes the blending method like pilgram2.css.blending.normal
or .darken
Could be helpful to have a look at the test methods also.
Does this help?
from pilgram2.
how about nonseparable ?
e.g.
pilgram2.css.blending.nonseparable(filtered, filtered_css).save(blended_img)
best regards
from pilgram2.
Nonseparable also not considered as blendmode and internal.
from pilgram2.
Related Issues (3)
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 pilgram2.