IP Library Granted Patent US 11,367,232
Granted Patent B2
US 11,367,232 · App. 17/079,051 · Granted Jun 21, 2022

Method and device for generating stickers

Inventor: Chi Zheng (Beijing, CN)
Assignee: Beijing Dajia Internet Information Technology Co., Ltd.
G06T11/60G06F40/106G06F40/109G06T11/001
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 11,367,232
App. No.
17/079,051
Granted
Jun 21, 2022
Kind
B2
Abstract

The disclosure relates to a method and a device for generating a sticker. The method and device can receive a sticker configuration file from a server, where the sticker configuration file includes configuration parameters, and the configuration parameters represent display styles of a background image element and at least one text element in a target sticker to be generated; acquire a sticker background image and sticker characters input by a user as the background image element and the at least one text element respectively; and generate the target sticker according to the background image element, at least one the text element and the configuration parameters.

Claims (67)

1. A method for generating a sticker, applied to a terminal and comprising:

receiving a sticker configuration file from a server, wherein the sticker configuration file comprises configuration parameters, and the configuration parameters represent display styles of a background image element and at least one text element in a target sticker to be generated;

determining the background image element by acquiring a sticker background image;

determining the at least one text element by acquiring a sticker character input by a user;

determining a width of the target sticker by determining a maximum width between a width occupied by the at least one text element in the target sticker and a width occupied by the background image element in the target sticker;

determining a height of the target sticker by determining a maximum height between a height occupied by the at least one text element in the target sticker and a height occupied by the background image element in the target sticker; and

generating the target sticker to be added on a video played in the terminal based on the background image element, the at least one text element, the width and the height of the target sticker, and the configuration parameters,

wherein the configuration parameters comprise:

a stretching style of the background image element,

a parameter indicating whether a width of the background image element is prohibited from shrinking to be within a width indicated by an imageWidth parameter when the background image element is stretched,

a parameter indicating whether a height of the background image element is prohibited from shrinking to be within a height indicated by an imageHeight parameter when the background image element is stretched, and

a position of the background image element in the target sticker.

2. The method according to claim 1 , wherein the sticker configuration file further comprises an image identifier; and

said acquiring the sticker background image comprises:

acquiring a corresponding image from the server as the sticker background image based on the image identifier; or

receiving an image selected by the user from locally stored images as the sticker background image.

3. The method according to claim 1 , wherein the configuration parameters comprise:

a first parameter and a second parameter configured to represent the width and the height occupied by the at least one text element in the target sticker respectively,

a third parameter and a fourth parameter configured to represent the width and the height occupied by the background image element in the target sticker respectively,

a fifth parameter configured to represent a position of the at least one text element in the target sticker, and

a sixth parameter configured to represent a position of the background image element in the target sticker;

wherein said generating the target sticker comprises:

determining the width occupied by the at least one text element in the target sticker based on the first parameter, and determining the height occupied by the at least one text element in the target sticker based on the second parameter;

determining the width occupied by the background image element in the target sticker based on the third parameter, and determining the height occupied by the background image element in the target sticker based on the fourth parameter; and

generating the target sticker by performing position constraint on the at least one text element and the background image element, based on the width and the height of the target sticker, the fifth parameter and the sixth parameter,

wherein the third parameter comprises:

the stretching style of the background image element,

the parameter indicating whether the width of the background image element is prohibited from shrinking to be within the width indicated by the imageWidth parameter when the background image element is stretched,

the parameter indicating whether the height of the background image element is prohibited from shrinking to be within the height indicated by the imageHeight parameter when the background image element is stretched, and

the position of the background image element in the target sticker.

4. The method according to claim 3 ,

wherein the first parameter comprises a seventh parameter, and the seventh parameter represents a width occupied by each of the at least one text element in the target sticker; and

the second parameter comprises an eighth parameter, and the eighth parameter represents a height occupied by the each text element in the target sticker;

wherein said determining the width and the height occupied by the at least one text element comprise:

determining the width occupied by the each text element in the target sticker based on the seventh parameter corresponding to the each text element; and

determining the height occupied by the each text element in the target sticker based on the eighth parameter corresponding to the each text element.

5. A terminal, comprising:

a processor; and

a memory, configured to store executable instructions of the processor;

wherein the processor is configured to execute the instructions to:

receive a sticker configuration file from a server, wherein the sticker configuration file comprises configuration parameters, and the configuration parameters represent display styles of a background image element and at least one text element in a target sticker to be generated;

determine the background image element by acquiring a sticker background image, and determine the at least one text element by acquiring a sticker character input by a user;

determine a width of the target sticker by determining a maximum width between a width occupied by the at least one text element in the target sticker and a width occupied by the background image element in the target sticker;

determine a height of the target sticker by determining a maximum height between a height occupied by the at least one text element in the target sticker and a height occupied by the background image element in the target sticker; and

generate the target sticker to be added on a video played in the terminal based on the background image element, the at least one text element, the width and the height of the target sticker, and the configuration parameters,

wherein the configuration parameters comprise:

a stretching style of the background image element,

a parameter indicating whether a width of the background image element is prohibited from shrinking to be within a width indicated by an imageWidth parameter when the background image element is stretched,

a parameter indicating whether a height of the background image element is prohibited from shrinking to be within a height indicated by an imageHeight parameter when the background image element is stretched, and

a position of the background image element in the target sticker.

6. The terminal according to claim 5 , wherein the sticker configuration file further comprises an image identifier; and

the processor is further configured to: acquire a corresponding image from the server as the sticker background image based on the image identifier, or receive an image selected by the user from locally stored images as the sticker background image.

7. The terminal according to claim 5 , wherein the configuration parameters comprise:

a first parameter and a second parameter configured to represent the width and the height occupied by the at least one text element in the target sticker respectively,

a third parameter and a fourth parameter configured to represent the width and the height occupied by the background image element in the target sticker respectively,

a fifth parameter configured to represent a position of the at least one text element in the target sticker, and

a sixth parameter configured to represent a position of the background image element in the target sticker;

wherein the processor is further configured to:

determine the width occupied by the at least one text element in the target sticker based on the first parameter, and determine the height occupied by the at least one text element in the target sticker based on the second parameter;

determine the width occupied by the background image element in the target sticker based on the third parameter, and determine the height occupied by the background image element in the target sticker based on the fourth parameter; and

generate the target sticker by performing position constraint on the at least one text element and the background image element, based on the width and the height of the target sticker, the fifth parameter and the sixth parameter,

wherein the third parameter comprises:

the stretching style of the background image element,

the parameter indicating whether the width of the background image element is prohibited from shrinking to be within the width indicated by the imageWidth parameter when the background image element is stretched,

the parameter indicating whether the height of the background image element is prohibited from shrinking to be within the height indicated by the imageHeight parameter when the background image element is stretched, and

the position of the background image element in the target sticker.

8. A non-transitory storage medium, wherein when instructions in the storage medium are executed by a processor of a terminal, the terminal implements the method for generating the sticker according to claim 1 .

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Oct 23, 2020
From: ZHENG, CHI
To: BEIJING DAJIA INTERNET INFORMATION TECHNOLOGY CO., LTD.
Reel/Frame 054154/0903 →
Priority Claims (1)
CN 201911024867.X · Oct 25, 2019 · national
Continuity (1)
Related Publication 20210042978A1 · Feb 11, 2021