Skip to content

Commit fed1f72

Browse files
committed
Changing the reference URL to a file link, that will not depend on internet conection nor on the filesystem changing.
Also applied some suggestions from beackl
1 parent 8ce994a commit fed1f72

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

docs/source/examples/shapes_images_positions.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ Shapes, Images and Positions
2020
.. manim:: PointMovingOnShapes
2121

2222
class PointMovingOnShapes(Scene):
23-
2423
def construct(self):
2524

2625
circle = Circle(radius= 1, color=BLUE)
@@ -46,7 +45,9 @@ Shapes, Images and Positions
4645
class GradientImageFromArray(Scene):
4746
def construct(self):
4847
n = 256
49-
imageArray = np.uint8([[i*256/n for i in range(0,n)] for _ in range(0,n)])
48+
imageArray = np.uint8(
49+
[[i * 256 / n for i in range(0, n)] for _ in range(0, n)]
50+
)
5051
image = ImageMobject(imageArray).scale(2)
5152
self.add(image)
5253

@@ -59,8 +60,7 @@ Shapes, Images and Positions
5960
# Use PIL when you want to import an image from the web
6061
import requests
6162
from PIL import Image
62-
img = Image.open(requests.get("https://raw.githubusercontent.com/ManimCommunity/manim/master/logo/cropped.png",
63-
stream=True).raw)
63+
img = Image.open("../logo/cropped.png")
6464
img_mobject = ImageMobject(img)
6565
# this line, when you want to import your Image on your machine
6666
# img_mobject = ImageMobject("<your image address>")

0 commit comments

Comments
 (0)