A community-maintained Python framework for creating mathematical animations.
Running black … again
MysaaJava4ce9a05f78c8
diff --git a/manim/mobject/types/image_mobject.py b/manim/mobject/types/image_mobject.pyindex 6b7cfc30f..0d58a5765 100644--- a/manim/mobject/types/image_mobject.py+++ b/manim/mobject/types/image_mobject.py@@ -49,37 +49,38 @@ class AbstractImageMobject(Mobject):class ImageMobject(AbstractImageMobject):- """ Displays an Image from a numpy array or a file.-- Examples- --------- .. manim:: ImageFromArray- :save_last_frame:-- class ImageFromArray(Scene):- def construct(self):- image = ImageMobject(np.uint8([[0, 100, 30, 200],- [255, 0, 5, 33]]))- image.set_height(7)- self.add(image)-- .. manim:: ImageFromFile- :save_last_frame:-- class ImageFromFile(Scene):- def construct(self):- # Use PIL when you want to import an image from the web- import requests- from PIL import Image- img = Image.open(requests.get("https://raw.githubusercontent.com/ManimCommunity/manim/master/logo/logoB.png",- stream=True).raw)- img_mobject = ImageMobject(img)- # this line, when you want to import your Image on your machine- # img_mobject = ImageMobject("<your image address>")- img_mobject.scale(3)- self.add(img_mobject)-+ """Displays an Image from a numpy array or a file.++ Examples+ --------+ .. manim:: ImageFromArray+ :save_last_frame:++ class ImageFromArray(Scene):+ def construct(self):+ image = ImageMobject(np.uint8([[0, 100, 30, 200],+ [255, 0, 5, 33]]))+ image.set_height(7)+ self.add(image)++ .. manim:: ImageFromFile+ :save_last_frame:++ class ImageFromFile(Scene):+ def construct(self):+ # Use PIL when you want to import an image from the web+ import requests+ from PIL import Image+ img = Image.open(requests.get("https://raw.githubusercontent.com/ManimCommunity/manim/master/logo/logoB.png",+ stream=True).raw)+ img_mobject = ImageMobject(img)+ # this line, when you want to import your Image on your machine+ # img_mobject = ImageMobject("<your image address>")+ img_mobject.scale(3)+ self.add(img_mobject)+"""+CONFIG = {"invert": False,"image_mode": "RGBA",