-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Open
Labels
issue:bugSomething isn't working... For use in issuesSomething isn't working... For use in issues
Description
Description of bug / unexpected behavior
Attempting to flip a ImageMobject
across an axis does not seem to behave correctly. Flipping across the UP
axis acts the same as a 180° rotation, while flipping across the RIGHT
axis does nothing.
How to reproduce the issue
class Main(Scene):
def construct(self):
imgs = [ImageMobject("thinking.png").scale(0.1) for i in range(4)]
self.add(Group(
imgs[0],
imgs[1].flip(),
imgs[2].rotate(PI, UP),
imgs[3].apply_matrix([[-1, 0], [0, 1]])
).arrange(RIGHT))
Additional media files
Additional comments
The only way I have figured out to flip images across a single axis so far is to edit the pixel array like so:
img.pixel_array = np.fliplr(img.pixel_array) # for horizontal
img.pixel_array = np.flipud(img.pixel_array) # for vertical
Metadata
Metadata
Assignees
Labels
issue:bugSomething isn't working... For use in issuesSomething isn't working... For use in issues
Type
Projects
Status
🆕 New