- Documentation
Torch Object Storage
User Guide
Data processing
Basic concepts
Pipeline
Pipeline
A pipeline is a series of commands connected by pipeline operators (|). TOS enables you to use these operators to chain multiple data processing operations, eliminating the need for manual transfer of intermediate results. TOS then executes these operations in the defined order, thereby improving processing efficiency. This topic explains the notes, rules, and usage examples for pipelines.
The following two types of operations are supported when using the pipeline operator (|): 1) chaining multiple image processing operations, and 2) chaining frame extraction with image processing operations. For more information, see Image processing overview and Snapshot. A pipeline symbol is a typographical mark that looks like a vertical line (|). You can use the vertical bar (|) in the file URL to chain multiple data processing operations. TOS executes these operations sequentially, from left to right, according to the order defined in the file URL. Follow the rules below to chain operations.
- Example 1: Chain image resizing and watermarking
- Specify the width as 200 and the height as 200, and set the mode to fixed.
-
- Chain image resizing and watermarking
- Specify the width as 200 and the height as 200, and set the mode to fixed. Apply a text watermark to the image that reads "Hello", and set the text size to 72, the color to red, and the font to FangZhengShuSong.
-
- Example 2: Chain frame extraction and image rotation
- Extract a frame from a video
- Use the default mode to extract the frame at 26000ms. Scale the image to a width of 400 px and a height of 200 px. Set the output format to jpg.
-
- Chain frame extraction and image rotation
- Use the default mode to extract the frame at 26000ms. Scale the image to a width of 400 px and a height of 200 px. Set the output format to jpg. Rotate the image 90 degrees clockwise
-
Last updated: 2026.10.09 14:46:05