Show Menu
TOPICS×

s7vampy.create_rgb(image)

Create an RGB image.
Create a solid color RGB image of the given width and height.
Parameter width int:
int width
Width of the image.
Parameter height int:
int height
Height of the image.
Parameter color tuple:
color tuple
Color of the image.
Returns:
Image instance.
Creating a 200x300 solid red image:
>>> from s7vampy import *
>>> img = create_rgb_image(200, 300, (255, 0, 0))
>>> img
{name='rgb_image', has_alpha=False, size=(200, 300)}

Creating a 200x300 solid green image:
>>> from s7vampy import *
>>> img = create_rgb_image(200, 300, 0, 255, 0)
>>> img
{name='rgb_image', has_alpha=False, size=(200, 300)}

Creating a 200x300 solid white image:
>>> from s7vampy import *
>>> img = create_rgb_image(200, 300, 255)
>>> img
{name='rgb_image', has_alpha=False, size=(200, 300)}