- class AbstractImageMobject(scale_to_resolution, pixel_array_dtype='uint8', resampling_algorithm=Resampling.BICUBIC, **kwargs)[source]#
Automatically filters out black pixels
scale_to_resolution (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 e.g. the
--quality mediumflag for faster rendering won’t effect the position of the image on the screen.
pointsto be an empty array.
Condition is function which takes in one arguments, (x, y, z).
Sets the interpolation method for upscaling the image.
Used to animate the application of any method of
The depth of the mobject.
The height of the mobject.
The width of the mobject.
- set_color(color, alpha=None, family=True)[source]#
Condition is function which takes in one arguments, (x, y, z). Here it just recurses to submobjects, but in subclasses this should be further implemented based on the the inner workings of color
Sets the interpolation method for upscaling the image. By default the image is interpolated using bicubic algorithm. This method lets you change it. Interpolation is done internally using Pillow, and the function besides the string constants describing the algorithm accepts the Pillow integer constants.
resampling_algorithm (int) –
An integer constant described in the Pillow library, or one from the RESAMPLING_ALGORITHMS global dictionary, under the following keys:
’bicubic’ or ‘cubic’
’nearest’ or ‘none’
’bilinear’ or ‘linear’
’lanczos’ or ‘antialias’