We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Making test for SVGMobject
Here, I have some test and folder structure for SVGMobject and ImageMobject.
The images and svgs for the test can be found in a new folder called img_svg_resources

Depends on #650 

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `manim/mobject/types/image_mobject.py`
Content:
```
1 """Mobjects representing raster images."""
2 
3 __all__ = ["AbstractImageMobject", "ImageMobject", "ImageMobjectFromCamera"]
4 
5 import pathlib
6 
7 import numpy as np
8 
9 from PIL import Image
10 
11 from ... import config
12 from ...constants import *
13 from ...mobject.mobject import Mobject
14 from ...mobject.shape_matchers import SurroundingRectangle
15 from ...utils.bezier import interpolate
16 from ...utils.color import color_to_int_rgb, WHITE
17 from ...utils.config_ops import digest_config
18 from ...utils.images import get_full_raster_image_path
19 from manim.constants import QUALITIES, DEFAULT_QUALITY
20 
21 
22 class AbstractImageMobject(Mobject):
23     """
24     Automatically filters out black pixels
25 
26     Parameters
27     ----------
28     scale_to_resolution : :class:`int`
29         At this resolution the image is placed pixel by pixel onto the screen, so it will look the sharpest and best.
30         This is a custom parameter of ImageMobject so that rendering a scene with the `--quality low` flag for faster rendering and testing won't effect the position of the image on the screen.
31         Calculated by `height = image_height / scale_to_resolution * config["frame_height"]`
32     """
33 
34     CONFIG = {
35         "pixel_array_dtype": "uint8",
36     }
37 
38     def __init__(self, scale_to_resolution, **kwargs):
39         digest_config(self, kwargs)
40         self.scale_to_resolution = scale_to_resolution
41 
42         Mobject.__init__(self, **kwargs)
43 
44     def get_pixel_array(self):
45         raise NotImplementedError()
46 
47     def set_color(self):
48         # Likely to be implemented in subclasses, but no obgligation
49         pass
50 
51     def reset_points(self):
52         # Corresponding corners of image are fixed to these 3 points
53         self.points = np.array(
54             [
55                 UP + LEFT,
56                 UP + RIGHT,
57                 DOWN + LEFT,
58             ]
59         )
60         self.center()
61         h, w = self.get_pixel_array().shape[:2]
62         if self.scale_to_resolution:
63             self.height = h / self.scale_to_resolution * config["frame_height"]
64         else:
65             self.height = 3  ## this is the case for ImageMobjectFromCamera
66         self.stretch_to_fit_height(self.height)
67         self.stretch_to_fit_width(self.height * w / h)
68 
69 
70 class ImageMobject(AbstractImageMobject):
71     """Displays an Image from a numpy array or a file.
72 
73     Parameters
74         ----------
75         scale_to_resolution : :class:`int`
76             At this resolution the image is placed pixel by pixel onto the screen, so it will look the sharpest and best.
77             This is a custom parameter of ImageMobject so that rendering a scene with the `--quality low` flag for faster rendering and testing won't effect the position of the image on the screen.
78             Calculated by `height = image_height / scale_to_resolution * config["frame_height"]`
79 
80 
81 
82     Example
83     -------
84     .. manim:: ImageFromArray
85         :save_last_frame:
86 
87         class ImageFromArray(Scene):
88             def construct(self):
89                 image = ImageMobject(np.uint8([[0, 100, 30, 200],
90                                                [255, 0, 5, 33]]))
91                 image.set_height(7)
92                 self.add(image)
93 
94     """
95 
96     CONFIG = {
97         "invert": False,
98         "image_mode": "RGBA",
99     }
100 
101     def __init__(
102         self,
103         filename_or_array,
104         scale_to_resolution=QUALITIES[DEFAULT_QUALITY]["pixel_height"],
105         **kwargs,
106     ):
107         digest_config(self, kwargs)
108         if isinstance(filename_or_array, (str, pathlib.PurePath)):
109             path = get_full_raster_image_path(filename_or_array)
110             image = Image.open(path).convert(self.image_mode)
111             self.pixel_array = np.array(image)
112         else:
113             self.pixel_array = np.array(filename_or_array)
114         self.change_to_rgba_array()
115         if self.invert:
116             self.pixel_array[:, :, :3] = 255 - self.pixel_array[:, :, :3]
117         AbstractImageMobject.__init__(self, scale_to_resolution, **kwargs)
118 
119     def change_to_rgba_array(self):
120         pa = self.pixel_array
121         if len(pa.shape) == 2:
122             pa = pa.reshape(list(pa.shape) + [1])
123         if pa.shape[2] == 1:
124             pa = pa.repeat(3, axis=2)
125         if pa.shape[2] == 3:
126             alphas = 255 * np.ones(
127                 list(pa.shape[:2]) + [1], dtype=self.pixel_array_dtype
128             )
129             pa = np.append(pa, alphas, axis=2)
130         self.pixel_array = pa
131 
132     def get_pixel_array(self):
133         return self.pixel_array
134 
135     def set_color(self, color, alpha=None, family=True):
136         rgb = color_to_int_rgb(color)
137         self.pixel_array[:, :, :3] = rgb
138         if alpha is not None:
139             self.pixel_array[:, :, 3] = int(255 * alpha)
140         for submob in self.submobjects:
141             submob.set_color(color, alpha, family)
142         self.color = color
143         return self
144 
145     def set_opacity(self, alpha):
146         self.pixel_array[:, :, 3] = int(255 * alpha)
147         return self
148 
149     def fade(self, darkness=0.5, family=True):
150         self.set_opacity(1 - darkness)
151         super().fade(darkness, family)
152         return self
153 
154     def interpolate_color(self, mobject1, mobject2, alpha):
155         assert mobject1.pixel_array.shape == mobject2.pixel_array.shape, (
156             f"Mobject pixel array shapes incompatible for interpolation.\n"
157             f"Mobject 1 ({mobject1}) : {mobject1.pixel_array.shape}\n"
158             f"Mobject 2 ({mobject2}) : {mobject1.pixel_array.shape}"
159         )
160         self.pixel_array = interpolate(
161             mobject1.pixel_array, mobject2.pixel_array, alpha
162         ).astype(self.pixel_array_dtype)
163 
164 
165 # TODO, add the ability to have the dimensions/orientation of this
166 # mobject more strongly tied to the frame of the camera it contains,
167 # in the case where that's a MovingCamera
168 
169 
170 class ImageMobjectFromCamera(AbstractImageMobject):
171     CONFIG = {
172         "default_display_frame_config": {
173             "stroke_width": 3,
174             "stroke_color": WHITE,
175             "buff": 0,
176         }
177     }
178 
179     def __init__(self, camera, **kwargs):
180         self.camera = camera
181         self.pixel_array = self.camera.pixel_array
182         AbstractImageMobject.__init__(self, scale_to_resolution=False, **kwargs)
183 
184     # TODO: Get rid of this.
185     def get_pixel_array(self):
186         self.pixel_array = self.camera.pixel_array
187         return self.pixel_array
188 
189     def add_display_frame(self, **kwargs):
190         config = dict(self.default_display_frame_config)
191         config.update(kwargs)
192         self.display_frame = SurroundingRectangle(self, **config)
193         self.add(self.display_frame)
194         return self
195 
196     def interpolate_color(self, mobject1, mobject2, alpha):
197         assert mobject1.pixel_array.shape == mobject2.pixel_array.shape, (
198             f"Mobject pixel array shapes incompatible for interpolation.\n"
199             f"Mobject 1 ({mobject1}) : {mobject1.pixel_array.shape}\n"
200             f"Mobject 2 ({mobject2}) : {mobject1.pixel_array.shape}"
201         )
202         self.pixel_array = interpolate(
203             mobject1.pixel_array, mobject2.pixel_array, alpha
204         ).astype(self.pixel_array_dtype)
205
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/manim/mobject/types/image_mobject.py b/manim/mobject/types/image_mobject.py
--- a/manim/mobject/types/image_mobject.py
+++ b/manim/mobject/types/image_mobject.py
@@ -27,8 +27,7 @@
     ----------
     scale_to_resolution : :class:`int`
         At this resolution the image is placed pixel by pixel onto the screen, so it will look the sharpest and best.
-        This is a custom parameter of ImageMobject so that rendering a scene with the `--quality low` flag for faster rendering and testing won't effect the position of the image on the screen.
-        Calculated by `height = image_height / scale_to_resolution * config["frame_height"]`
+        This is a custom parameter of ImageMobject so that rendering a scene with e.g. the ``--quality low`` or ``--quality medium`` flag for faster rendering won't effect the position of the image on the screen.
     """
 
     CONFIG = {
@@ -74,8 +73,7 @@
         ----------
         scale_to_resolution : :class:`int`
             At this resolution the image is placed pixel by pixel onto the screen, so it will look the sharpest and best.
-            This is a custom parameter of ImageMobject so that rendering a scene with the `--quality low` flag for faster rendering and testing won't effect the position of the image on the screen.
-            Calculated by `height = image_height / scale_to_resolution * config["frame_height"]`
+            This is a custom parameter of ImageMobject so that rendering a scene with e.g. the ``--quality low`` or ``--quality medium`` flag for faster rendering won't effect the position of the image on the screen.

{"golden_diff": "diff --git a/manim/mobject/types/image_mobject.py b/manim/mobject/types/image_mobject.py\n--- a/manim/mobject/types/image_mobject.py\n+++ b/manim/mobject/types/image_mobject.py\n@@ -27,8 +27,7 @@\n     ----------\n     scale_to_resolution : :class:`int`\n         At this resolution the image is placed pixel by pixel onto the screen, so it will look the sharpest and best.\n-        This is a custom parameter of ImageMobject so that rendering a scene with the `--quality low` flag for faster rendering and testing won't effect the position of the image on the screen.\n-        Calculated by `height = image_height / scale_to_resolution * config[\"frame_height\"]`\n+        This is a custom parameter of ImageMobject so that rendering a scene with e.g. the ``--quality low`` or ``--quality medium`` flag for faster rendering won't effect the position of the image on the screen.\n     \"\"\"\n \n     CONFIG = {\n@@ -74,8 +73,7 @@\n         ----------\n         scale_to_resolution : :class:`int`\n             At this resolution the image is placed pixel by pixel onto the screen, so it will look the sharpest and best.\n-            This is a custom parameter of ImageMobject so that rendering a scene with the `--quality low` flag for faster rendering and testing won't effect the position of the image on the screen.\n-            Calculated by `height = image_height / scale_to_resolution * config[\"frame_height\"]`\n+            This is a custom parameter of ImageMobject so that rendering a scene with e.g. the ``--quality low`` or ``--quality medium`` flag for faster rendering won't effect the position of the image on the screen.\n", "issue": "Making test for SVGMobject\nHere, I have some test and folder structure for SVGMobject and ImageMobject.\r\nThe images and svgs for the test can be found in a new folder called img_svg_resources\r\n\r\nDepends on #650 \n", "before_files": [{"content": "\"\"\"Mobjects representing raster images.\"\"\"\n\n__all__ = [\"AbstractImageMobject\", \"ImageMobject\", \"ImageMobjectFromCamera\"]\n\nimport pathlib\n\nimport numpy as np\n\nfrom PIL import Image\n\nfrom ... import config\nfrom ...constants import *\nfrom ...mobject.mobject import Mobject\nfrom ...mobject.shape_matchers import SurroundingRectangle\nfrom ...utils.bezier import interpolate\nfrom ...utils.color import color_to_int_rgb, WHITE\nfrom ...utils.config_ops import digest_config\nfrom ...utils.images import get_full_raster_image_path\nfrom manim.constants import QUALITIES, DEFAULT_QUALITY\n\n\nclass AbstractImageMobject(Mobject):\n    \"\"\"\n    Automatically filters out black pixels\n\n    Parameters\n    ----------\n    scale_to_resolution : :class:`int`\n        At this resolution the image is placed pixel by pixel onto the screen, so it will look the sharpest and best.\n        This is a custom parameter of ImageMobject so that rendering a scene with the `--quality low` flag for faster rendering and testing won't effect the position of the image on the screen.\n        Calculated by `height = image_height / scale_to_resolution * config[\"frame_height\"]`\n    \"\"\"\n\n    CONFIG = {\n        \"pixel_array_dtype\": \"uint8\",\n    }\n\n    def __init__(self, scale_to_resolution, **kwargs):\n        digest_config(self, kwargs)\n        self.scale_to_resolution = scale_to_resolution\n\n        Mobject.__init__(self, **kwargs)\n\n    def get_pixel_array(self):\n        raise NotImplementedError()\n\n    def set_color(self):\n        # Likely to be implemented in subclasses, but no obgligation\n        pass\n\n    def reset_points(self):\n        # Corresponding corners of image are fixed to these 3 points\n        self.points = np.array(\n            [\n                UP + LEFT,\n                UP + RIGHT,\n                DOWN + LEFT,\n            ]\n        )\n        self.center()\n        h, w = self.get_pixel_array().shape[:2]\n        if self.scale_to_resolution:\n            self.height = h / self.scale_to_resolution * config[\"frame_height\"]\n        else:\n            self.height = 3  ## this is the case for ImageMobjectFromCamera\n        self.stretch_to_fit_height(self.height)\n        self.stretch_to_fit_width(self.height * w / h)\n\n\nclass ImageMobject(AbstractImageMobject):\n    \"\"\"Displays an Image from a numpy array or a file.\n\n    Parameters\n        ----------\n        scale_to_resolution : :class:`int`\n            At this resolution the image is placed pixel by pixel onto the screen, so it will look the sharpest and best.\n            This is a custom parameter of ImageMobject so that rendering a scene with the `--quality low` flag for faster rendering and testing won't effect the position of the image on the screen.\n            Calculated by `height = image_height / scale_to_resolution * config[\"frame_height\"]`\n\n\n\n    Example\n    -------\n    .. manim:: ImageFromArray\n        :save_last_frame:\n\n        class ImageFromArray(Scene):\n            def construct(self):\n                image = ImageMobject(np.uint8([[0, 100, 30, 200],\n                                               [255, 0, 5, 33]]))\n                image.set_height(7)\n                self.add(image)\n\n    \"\"\"\n\n    CONFIG = {\n        \"invert\": False,\n        \"image_mode\": \"RGBA\",\n    }\n\n    def __init__(\n        self,\n        filename_or_array,\n        scale_to_resolution=QUALITIES[DEFAULT_QUALITY][\"pixel_height\"],\n        **kwargs,\n    ):\n        digest_config(self, kwargs)\n        if isinstance(filename_or_array, (str, pathlib.PurePath)):\n            path = get_full_raster_image_path(filename_or_array)\n            image = Image.open(path).convert(self.image_mode)\n            self.pixel_array = np.array(image)\n        else:\n            self.pixel_array = np.array(filename_or_array)\n        self.change_to_rgba_array()\n        if self.invert:\n            self.pixel_array[:, :, :3] = 255 - self.pixel_array[:, :, :3]\n        AbstractImageMobject.__init__(self, scale_to_resolution, **kwargs)\n\n    def change_to_rgba_array(self):\n        pa = self.pixel_array\n        if len(pa.shape) == 2:\n            pa = pa.reshape(list(pa.shape) + [1])\n        if pa.shape[2] == 1:\n            pa = pa.repeat(3, axis=2)\n        if pa.shape[2] == 3:\n            alphas = 255 * np.ones(\n                list(pa.shape[:2]) + [1], dtype=self.pixel_array_dtype\n            )\n            pa = np.append(pa, alphas, axis=2)\n        self.pixel_array = pa\n\n    def get_pixel_array(self):\n        return self.pixel_array\n\n    def set_color(self, color, alpha=None, family=True):\n        rgb = color_to_int_rgb(color)\n        self.pixel_array[:, :, :3] = rgb\n        if alpha is not None:\n            self.pixel_array[:, :, 3] = int(255 * alpha)\n        for submob in self.submobjects:\n            submob.set_color(color, alpha, family)\n        self.color = color\n        return self\n\n    def set_opacity(self, alpha):\n        self.pixel_array[:, :, 3] = int(255 * alpha)\n        return self\n\n    def fade(self, darkness=0.5, family=True):\n        self.set_opacity(1 - darkness)\n        super().fade(darkness, family)\n        return self\n\n    def interpolate_color(self, mobject1, mobject2, alpha):\n        assert mobject1.pixel_array.shape == mobject2.pixel_array.shape, (\n            f\"Mobject pixel array shapes incompatible for interpolation.\\n\"\n            f\"Mobject 1 ({mobject1}) : {mobject1.pixel_array.shape}\\n\"\n            f\"Mobject 2 ({mobject2}) : {mobject1.pixel_array.shape}\"\n        )\n        self.pixel_array = interpolate(\n            mobject1.pixel_array, mobject2.pixel_array, alpha\n        ).astype(self.pixel_array_dtype)\n\n\n# TODO, add the ability to have the dimensions/orientation of this\n# mobject more strongly tied to the frame of the camera it contains,\n# in the case where that's a MovingCamera\n\n\nclass ImageMobjectFromCamera(AbstractImageMobject):\n    CONFIG = {\n        \"default_display_frame_config\": {\n            \"stroke_width\": 3,\n            \"stroke_color\": WHITE,\n            \"buff\": 0,\n        }\n    }\n\n    def __init__(self, camera, **kwargs):\n        self.camera = camera\n        self.pixel_array = self.camera.pixel_array\n        AbstractImageMobject.__init__(self, scale_to_resolution=False, **kwargs)\n\n    # TODO: Get rid of this.\n    def get_pixel_array(self):\n        self.pixel_array = self.camera.pixel_array\n        return self.pixel_array\n\n    def add_display_frame(self, **kwargs):\n        config = dict(self.default_display_frame_config)\n        config.update(kwargs)\n        self.display_frame = SurroundingRectangle(self, **config)\n        self.add(self.display_frame)\n        return self\n\n    def interpolate_color(self, mobject1, mobject2, alpha):\n        assert mobject1.pixel_array.shape == mobject2.pixel_array.shape, (\n            f\"Mobject pixel array shapes incompatible for interpolation.\\n\"\n            f\"Mobject 1 ({mobject1}) : {mobject1.pixel_array.shape}\\n\"\n            f\"Mobject 2 ({mobject2}) : {mobject1.pixel_array.shape}\"\n        )\n        self.pixel_array = interpolate(\n            mobject1.pixel_array, mobject2.pixel_array, alpha\n        ).astype(self.pixel_array_dtype)\n", "path": "manim/mobject/types/image_mobject.py"}], "after_files": [{"content": "\"\"\"Mobjects representing raster images.\"\"\"\n\n__all__ = [\"AbstractImageMobject\", \"ImageMobject\", \"ImageMobjectFromCamera\"]\n\nimport pathlib\n\nimport numpy as np\n\nfrom PIL import Image\n\nfrom ... import config\nfrom ...constants import *\nfrom ...mobject.mobject import Mobject\nfrom ...mobject.shape_matchers import SurroundingRectangle\nfrom ...utils.bezier import interpolate\nfrom ...utils.color import color_to_int_rgb, WHITE\nfrom ...utils.config_ops import digest_config\nfrom ...utils.images import get_full_raster_image_path\nfrom manim.constants import QUALITIES, DEFAULT_QUALITY\n\n\nclass AbstractImageMobject(Mobject):\n    \"\"\"\n    Automatically filters out black pixels\n\n    Parameters\n    ----------\n    scale_to_resolution : :class:`int`\n        At this resolution the image is placed pixel by pixel onto the screen, so it will look the sharpest and best.\n        This is a custom parameter of ImageMobject so that rendering a scene with e.g. the ``--quality low`` or ``--quality medium`` flag for faster rendering won't effect the position of the image on the screen.\n    \"\"\"\n\n    CONFIG = {\n        \"pixel_array_dtype\": \"uint8\",\n    }\n\n    def __init__(self, scale_to_resolution, **kwargs):\n        digest_config(self, kwargs)\n        self.scale_to_resolution = scale_to_resolution\n\n        Mobject.__init__(self, **kwargs)\n\n    def get_pixel_array(self):\n        raise NotImplementedError()\n\n    def set_color(self):\n        # Likely to be implemented in subclasses, but no obgligation\n        pass\n\n    def reset_points(self):\n        # Corresponding corners of image are fixed to these 3 points\n        self.points = np.array(\n            [\n                UP + LEFT,\n                UP + RIGHT,\n                DOWN + LEFT,\n            ]\n        )\n        self.center()\n        h, w = self.get_pixel_array().shape[:2]\n        if self.scale_to_resolution:\n            self.height = h / self.scale_to_resolution * config[\"frame_height\"]\n        else:\n            self.height = 3  ## this is the case for ImageMobjectFromCamera\n        self.stretch_to_fit_height(self.height)\n        self.stretch_to_fit_width(self.height * w / h)\n\n\nclass ImageMobject(AbstractImageMobject):\n    \"\"\"Displays an Image from a numpy array or a file.\n\n    Parameters\n        ----------\n        scale_to_resolution : :class:`int`\n            At this resolution the image is placed pixel by pixel onto the screen, so it will look the sharpest and best.\n            This is a custom parameter of ImageMobject so that rendering a scene with e.g. the ``--quality low`` or ``--quality medium`` flag for faster rendering won't effect the position of the image on the screen.\n\n\n\n    Example\n    -------\n    .. manim:: ImageFromArray\n        :save_last_frame:\n\n        class ImageFromArray(Scene):\n            def construct(self):\n                image = ImageMobject(np.uint8([[0, 100, 30, 200],\n                                               [255, 0, 5, 33]]))\n                image.set_height(7)\n                self.add(image)\n\n    \"\"\"\n\n    CONFIG = {\n        \"invert\": False,\n        \"image_mode\": \"RGBA\",\n    }\n\n    def __init__(\n        self,\n        filename_or_array,\n        scale_to_resolution=QUALITIES[DEFAULT_QUALITY][\"pixel_height\"],\n        **kwargs,\n    ):\n        digest_config(self, kwargs)\n        if isinstance(filename_or_array, (str, pathlib.PurePath)):\n            path = get_full_raster_image_path(filename_or_array)\n            image = Image.open(path).convert(self.image_mode)\n            self.pixel_array = np.array(image)\n        else:\n            self.pixel_array = np.array(filename_or_array)\n        self.change_to_rgba_array()\n        if self.invert:\n            self.pixel_array[:, :, :3] = 255 - self.pixel_array[:, :, :3]\n        AbstractImageMobject.__init__(self, scale_to_resolution, **kwargs)\n\n    def change_to_rgba_array(self):\n        pa = self.pixel_array\n        if len(pa.shape) == 2:\n            pa = pa.reshape(list(pa.shape) + [1])\n        if pa.shape[2] == 1:\n            pa = pa.repeat(3, axis=2)\n        if pa.shape[2] == 3:\n            alphas = 255 * np.ones(\n                list(pa.shape[:2]) + [1], dtype=self.pixel_array_dtype\n            )\n            pa = np.append(pa, alphas, axis=2)\n        self.pixel_array = pa\n\n    def get_pixel_array(self):\n        return self.pixel_array\n\n    def set_color(self, color, alpha=None, family=True):\n        rgb = color_to_int_rgb(color)\n        self.pixel_array[:, :, :3] = rgb\n        if alpha is not None:\n            self.pixel_array[:, :, 3] = int(255 * alpha)\n        for submob in self.submobjects:\n            submob.set_color(color, alpha, family)\n        self.color = color\n        return self\n\n    def set_opacity(self, alpha):\n        self.pixel_array[:, :, 3] = int(255 * alpha)\n        return self\n\n    def fade(self, darkness=0.5, family=True):\n        self.set_opacity(1 - darkness)\n        super().fade(darkness, family)\n        return self\n\n    def interpolate_color(self, mobject1, mobject2, alpha):\n        assert mobject1.pixel_array.shape == mobject2.pixel_array.shape, (\n            f\"Mobject pixel array shapes incompatible for interpolation.\\n\"\n            f\"Mobject 1 ({mobject1}) : {mobject1.pixel_array.shape}\\n\"\n            f\"Mobject 2 ({mobject2}) : {mobject1.pixel_array.shape}\"\n        )\n        self.pixel_array = interpolate(\n            mobject1.pixel_array, mobject2.pixel_array, alpha\n        ).astype(self.pixel_array_dtype)\n\n\n# TODO, add the ability to have the dimensions/orientation of this\n# mobject more strongly tied to the frame of the camera it contains,\n# in the case where that's a MovingCamera\n\n\nclass ImageMobjectFromCamera(AbstractImageMobject):\n    CONFIG = {\n        \"default_display_frame_config\": {\n            \"stroke_width\": 3,\n            \"stroke_color\": WHITE,\n            \"buff\": 0,\n        }\n    }\n\n    def __init__(self, camera, **kwargs):\n        self.camera = camera\n        self.pixel_array = self.camera.pixel_array\n        AbstractImageMobject.__init__(self, scale_to_resolution=False, **kwargs)\n\n    # TODO: Get rid of this.\n    def get_pixel_array(self):\n        self.pixel_array = self.camera.pixel_array\n        return self.pixel_array\n\n    def add_display_frame(self, **kwargs):\n        config = dict(self.default_display_frame_config)\n        config.update(kwargs)\n        self.display_frame = SurroundingRectangle(self, **config)\n        self.add(self.display_frame)\n        return self\n\n    def interpolate_color(self, mobject1, mobject2, alpha):\n        assert mobject1.pixel_array.shape == mobject2.pixel_array.shape, (\n            f\"Mobject pixel array shapes incompatible for interpolation.\\n\"\n            f\"Mobject 1 ({mobject1}) : {mobject1.pixel_array.shape}\\n\"\n            f\"Mobject 2 ({mobject2}) : {mobject1.pixel_array.shape}\"\n        )\n        self.pixel_array = interpolate(\n            mobject1.pixel_array, mobject2.pixel_array, alpha\n        ).astype(self.pixel_array_dtype)\n", "path": "manim/mobject/types/image_mobject.py"}]}