Skip to content

Commit 4ce9a05

Browse files
committed
Running black … again
1 parent a39ac3b commit 4ce9a05

File tree

1 file changed

+31
-30
lines changed

1 file changed

+31
-30
lines changed

manim/mobject/types/image_mobject.py

Lines changed: 31 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -49,37 +49,38 @@ def reset_points(self):
4949

5050

5151
class ImageMobject(AbstractImageMobject):
52-
""" Displays an Image from a numpy array or a file.
53-
54-
Examples
55-
--------
56-
.. manim:: ImageFromArray
57-
:save_last_frame:
58-
59-
class ImageFromArray(Scene):
60-
def construct(self):
61-
image = ImageMobject(np.uint8([[0, 100, 30, 200],
62-
[255, 0, 5, 33]]))
63-
image.set_height(7)
64-
self.add(image)
65-
66-
.. manim:: ImageFromFile
67-
:save_last_frame:
68-
69-
class ImageFromFile(Scene):
70-
def construct(self):
71-
# Use PIL when you want to import an image from the web
72-
import requests
73-
from PIL import Image
74-
img = Image.open(requests.get("https://raw.githubusercontent.com/ManimCommunity/manim/master/logo/logoB.png",
75-
stream=True).raw)
76-
img_mobject = ImageMobject(img)
77-
# this line, when you want to import your Image on your machine
78-
# img_mobject = ImageMobject("<your image address>")
79-
img_mobject.scale(3)
80-
self.add(img_mobject)
81-
52+
"""Displays an Image from a numpy array or a file.
53+
54+
Examples
55+
--------
56+
.. manim:: ImageFromArray
57+
:save_last_frame:
58+
59+
class ImageFromArray(Scene):
60+
def construct(self):
61+
image = ImageMobject(np.uint8([[0, 100, 30, 200],
62+
[255, 0, 5, 33]]))
63+
image.set_height(7)
64+
self.add(image)
65+
66+
.. manim:: ImageFromFile
67+
:save_last_frame:
68+
69+
class ImageFromFile(Scene):
70+
def construct(self):
71+
# Use PIL when you want to import an image from the web
72+
import requests
73+
from PIL import Image
74+
img = Image.open(requests.get("https://raw.githubusercontent.com/ManimCommunity/manim/master/logo/logoB.png",
75+
stream=True).raw)
76+
img_mobject = ImageMobject(img)
77+
# this line, when you want to import your Image on your machine
78+
# img_mobject = ImageMobject("<your image address>")
79+
img_mobject.scale(3)
80+
self.add(img_mobject)
81+
8282
"""
83+
8384
CONFIG = {
8485
"invert": False,
8586
"image_mode": "RGBA",

0 commit comments

Comments
 (0)