towhee.hub.builtin.operators.computer_vision.save_image

class towhee.hub.builtin.operators.computer_vision.save_image(dir: str, format: str = '.jpg')[source]

Bases: object

Save image to specific directory with the uuid name.

Parameters:

dir (str) – The directory to save image.

Examples:

>>> import towhee
>>> (
...     towhee.dc['path'](['https://github.com/towhee-io/towhee/raw/main/towhee_logo.png'])
...           .image_decode['path', 'img']()
...           .save_image['img','path_new'](dir='temp/pic', format="jpg")
...           .to_list()
... )
[<Entity dict_keys(['path', 'img', 'path_new'])>]

Methods

Attributes

metainfo

__call__(*args, **kws)

Call self as a function.

__init__(dir: str, format: str = '.jpg')[source]