El contenido no se encuentra disponible en el idioma seleccionado. Estamos trabajando continuamente para agregar más idiomas. Gracias por su apoyo.

Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive
On this page

Image Watermarks

Updated on 2024-02-29 GMT+08:00

Image watermark parameters are the parameters used when adding image watermarks.

You can pre-process the image watermark before adding it to the original image. These pre-processing operations include Resizing Images, Rotating Images, and Cropping Images, but does not include cropping it into an inscribed circle. In addition, you can scale the watermark based on the original image when resizing for pre-processing.

Table 1 lists the descriptions for image watermark parameters in detail.

Table 1 Image watermark parameters

Parameter

Value Description

Code Example

image

Watermark image path. This parameter is mandatory when you add a watermark.

The image watermark address is: bucketName/objectName(required code) or bucketName/objectName?x-image-process=image/command(required code).

NOTICE:

The content must be base64 code of URL. encodedObject = url_safe_base64_encode(object). For example, object panda.png will be encoded as cGFuZGEucG5n.

image/resize,w_400/watermark,image_aW1h

Z2UtZGVtby9sb2dvLnBuZz94LWltYWdlLXByb

2Nlc3M9aW1hZ2UvcmVzaXplLFBfMzA=,t_90,

g_br,x_10,y_10

P

Watermark image size. The watermark image is scaled according to the percentage P of the original image (image to which the watermark is added). The value ranges from 1 to 100.

NOTICE:

The preceding resize operation supports only the uppercase P parameter. To adjust the watermark image size, see Resizing Images (except the p parameter).

image-demo/logo.png?x-image-process=image/resize,P_50

API Call Examples

  • The watermark file is logo.png (logo address: e-share/image-demo/logo.png). Make the watermark located at the bottom right corner, with a transparency of 90 and default horizontal and vertical margins of 10.

    Parameters are as follows:

    Watermark image: e-share/image-demo/logo.png

    Corresponding Base64 code: ZS1zaGFyZS9pbWFnZS1kZW1vL2xvZ28ucG5n

    Watermark position (bottom right): g_br

    Transparency: t_90

    Horizontal and vertical margins: x_10,y_10

    The URL request is as follows:

    https://obs.region.example.com/example.jpg?x-image-process=image/watermark,image_ZS1zaGFyZS9pbWFnZS1kZW1vL2xvZ28ucG5n,g_br,t_90,x_10,y_10

    Figure 1 Example 1

    https://obs.region.example.com/image-demo/example.jpg?x-image-process=image/watermark,image_ZS1zaGFyZS9pbWFnZS1kZW1vL2xvZ28ucG5n,g_br,t_90,x_10,y_10

  • The watermark file is logo.png (logo address: e-share/image-demo/logo.png). Resize the watermark image by setting its width to 50. Other parameters are the same as those in the previous example.

    Parameters are as follows:

    Watermark image: e-share/image-demo/logo.png?x-image-process=image/resize,w_50

    Corresponding Base64 code: ZS1zaGFyZS9pbWFnZS1kZW1vL2xvZ28ucG5nP3gtaW1hZ2UtcHJvY2Vzcz1pbWFnZS9yZXNpemUsd181MA

    Watermark position (bottom right): g_br

    Transparency: t_90

    Horizontal and vertical margins: x_10,y_10

    The URL request is as follows:

    https://obs.region.example.com/example.jpg?x-image-process=image/watermark,image_ZS1zaGFyZS9pbWFnZS1kZW1vL2xvZ28ucG5nP3gtaW1hZ2UtcHJvY2Vzcz1pbWFnZS9yZXNpemUsd181MA,g_br,t_90,x_10,y_10

    Figure 2 Example 2

    https://obs.region.example.com/image-demo/example.jpg?x-image-process=image/watermark,image_ZS1zaGFyZS9pbWFnZS1kZW1vL2xvZ28ucG5nP3gtaW1hZ2UtcHJvY2Vzcz1pbWFnZS9yZXNpemUsd181MA,g_br,t_90,x_10,y_10

  • The watermark file is logo.png (logo address: e-share/image-demo/logo.png). Make the watermark image 50 percent of its original size. Other parameters are the same as those in the previous example.

    Parameters are as follows:

    Watermark image: e-share/image-demo/logo.png?x-image-process=image/resize,P_50

    Corresponding Base64 code: ZS1zaGFyZS9pbWFnZS1kZW1vL2xvZ28ucG5nP3gtaW1hZ2UtcHJvY2Vzcz1pbWFnZS9yZXNpemUsUF81MA

    Watermark position (bottom right): g_br

    Transparency: t_90

    Horizontal and vertical margins: x_10,y_10

    The URL request is as follows:

    https://obs.region.example.com/example.jpg?x-image-process=image/watermark,image_ZS1zaGFyZS9pbWFnZS1kZW1vL2xvZ28ucG5nP3gtaW1hZ2UtcHJvY2Vzcz1pbWFnZS9yZXNpemUsUF81MA,g_br,t_90,x_10,y_10

    Figure 3 Example 3

    https://obs.region.example.com/image-demo/example.jpg?x-image-process=image/watermark,image_ZS1zaGFyZS9pbWFnZS1kZW1vL2xvZ28ucG5nP3gtaW1hZ2UtcHJvY2Vzcz1pbWFnZS9yZXNpemUsUF81MA,g_br,t_90,x_10,y_10

GUI Example

You can configure image watermarks by editing image style on OBS Console. The watermark file is logo.png (logo address: e-share/image-demo/logo.png). The watermark locates at the bottom right corner, with a transparency of 90 and default horizontal and vertical margins of 10. Perform the following steps on the console:

  1. Log in to OBS Console, in the navigation tree on the left, click the bucket name and choose Image Processing.
  2. Click Create. The style editing page is displayed.
  3. On the editing page, input a style name, set the Edit Mode to GUI, and select Watermark.

    NOTE:

    A style name consists of letters (uppercase and lowercase), digits, periods (.), underlines (_), and hyphens (-), and contains 1 to 256 characters, for example, rotate_0001.

  4. Configure the following watermark parameters.

    • Watermark Type: Choose Image Watermark.
    • Watermark Image Path: Enter e-share/image-demo/logo.png.
    • Image Size (%): Set this parameter based on whether the watermark image is zoomed out.
    • Brightness: Retain the default value 0.
    • Contrast: Retain the default value 0.
    • Transparency: Set this parameter to 90.
    • Watermark Position: Select the arrow at the bottom right.
    • Vertical Margin: Retain the default value 10.
    • Horizontal Margin: Retain the default value 10.

  5. After finishing editing the image style, click OK to save the style. The new style will be displayed in the style list.

    You can use the new watermark style to process images by referring to Applying Image Styles.

Utilizamos cookies para mejorar nuestro sitio y tu experiencia. Al continuar navegando en nuestro sitio, tú aceptas nuestra política de cookies. Descubre más

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback