Watermarking Images
When an image is uploaded or updated to bucket hugb-bucket-input, an event is generated to trigger the function. The function watermarks the image and stores the watermarked one into bucket hugb-bucket-output.
Uploading an Image to Generate an Event
Log in to the OBS console, go to the object page of the hugb-bucket-input bucket, and upload the image.jpg image, as shown in Figure 1.
Triggering the Function
After the image is uploaded to bucket hugb-bucket-input, OBS generates an event to trigger the image watermarking function. The function watermarks the image and stores the watermarked one into bucket hugb-bucket-output. You can view running logs of the function on the Logs tab page, as shown in Figure 2.
On the hugb-bucket-output page in the OBS console, you can see the watermarked image image-watermark.jpg, as shown in Figure 3. In the Operation column, click Download to download the image and view the watermarking effect, as shown in Figure 4.
Last Article: Adding an Event Source
Next Article: Filtering Sensitive Information




Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.