CN110548290B - Image-text mixed arrangement method and device, electronic equipment and storage medium - Google Patents

Image-text mixed arrangement method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN110548290B
CN110548290B CN201910860352.7A CN201910860352A CN110548290B CN 110548290 B CN110548290 B CN 110548290B CN 201910860352 A CN201910860352 A CN 201910860352A CN 110548290 B CN110548290 B CN 110548290B
Authority
CN
China
Prior art keywords
text
picture
resource
arrangement information
arrangement
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910860352.7A
Other languages
Chinese (zh)
Other versions
CN110548290A (en
Inventor
程安来
胡清
黄浩
钟洪斌
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Chengdu Xishanju Interactive Entertainment Technology Co Ltd
Zhuhai Kingsoft Digital Network Technology Co Ltd
Original Assignee
Chengdu Xishanju Interactive Entertainment Technology Co Ltd
Zhuhai Kingsoft Digital Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Chengdu Xishanju Interactive Entertainment Technology Co Ltd, Zhuhai Kingsoft Digital Network Technology Co Ltd filed Critical Chengdu Xishanju Interactive Entertainment Technology Co Ltd
Priority to CN201910860352.7A priority Critical patent/CN110548290B/en
Publication of CN110548290A publication Critical patent/CN110548290A/en
Application granted granted Critical
Publication of CN110548290B publication Critical patent/CN110548290B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/50Controlling the output signals based on the game progress
    • A63F13/52Controlling the output signals based on the game progress involving aspects of the displayed game scene
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/60Generating or modifying game content before or while executing the game program, e.g. authoring tools specially adapted for game development or game-integrated level editor
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/60Generating or modifying game content before or while executing the game program, e.g. authoring tools specially adapted for game development or game-integrated level editor
    • A63F13/63Generating or modifying game content before or while executing the game program, e.g. authoring tools specially adapted for game development or game-integrated level editor by the player, e.g. authoring using a level editor

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The specification provides a picture and text mixed arrangement method, a device, an electronic device and a storage medium, wherein the picture and text mixed arrangement method comprises the following steps: acquiring a text resource and a picture resource to be processed; processing the text resource and the picture resource by calling a format generation interface to generate a text format of the text resource and a picture format of the picture resource; analyzing the text resource and the text format, obtaining text arrangement information according to an analysis result, analyzing the picture resource and the picture format, and obtaining picture arrangement information according to the analysis result; performing mixed arrangement processing according to the text arrangement information and the picture arrangement information to obtain picture-text mixed arrangement resources; the text resources and the picture resources are respectively processed to obtain the picture-text mixed arrangement resources, so that mixed arrangement of texts and pictures in various formats can be realized, the richness of the picture-text mixed arrangement resources is improved, and the workload of a picture-text mixed arrangement processing process is reduced.

Description

Image-text mixed arrangement method and device, electronic equipment and storage medium
Technical Field
The specification relates to the technical field of Internet, in particular to an image-text mixed arrangement method. The present disclosure also relates to an image-text mixing device, an electronic apparatus, and a computer-readable storage medium.
Background
With the development of internet technology, online games become an entertainment way for most people to play, and as Player groups increase, online games are becoming more abundant, and single-Player games (Singe-Player Game), multi-Player games (Muti-Player Game), and massive multi-Player online games (Massive Multiplayer Online Game) are various, so that players can select different kinds of games to play according to their own preferences.
In the prior art, in order to improve the experience effect of a player and the content display effect communicated in the game playing process, the picture and the descriptive text of the picture are displayed to the player through the picture-text mixed arrangement mode at the game interface, and in the chat process in the game, the chat content of the mixed arrangement of the text and the expression picture can also be sent in the chat window.
However, the display effect of the image-text mixed arrangement is generally realized through a unit 3D NGUI plug-in, the emotion picture is parsed into the text through the NGUI plug-in, and then the text is processed to generate the display content of the image-text mixed arrangement, the process can cause that the text file becomes huge in practical application and is not suitable for being applied in chat scenes, and the picture of the picture mixed arrangement is only limited to the emotion picture, so that the mixed arrangement of pictures and texts in other formats cannot be realized.
Disclosure of Invention
In view of this, the embodiments of the present disclosure provide an image-text mixing method to solve the technical defects existing in the prior art. The embodiment of the specification also provides a picture and text mixed arrangement device, electronic equipment and a computer readable storage medium.
According to a first aspect of embodiments of the present disclosure, there is provided an image-text shuffling method, including:
acquiring a text resource and a picture resource to be processed;
processing the text resource and the picture resource by calling a format generation interface to generate a text format of the text resource and a picture format of the picture resource;
analyzing the text resource and the text format, obtaining text arrangement information according to an analysis result, analyzing the picture resource and the picture format, and obtaining picture arrangement information according to the analysis result;
and carrying out mixed arrangement processing according to the text arrangement information and the picture arrangement information to obtain picture-text mixed arrangement resources.
Optionally, the text resource includes a corresponding text arrangement sequence, and the picture resource includes a corresponding picture arrangement sequence;
correspondingly, the performing mixed arrangement processing according to the text arrangement information and the picture arrangement information to obtain picture-text mixed arrangement resources comprises the following steps:
Arranging the text arrangement information and the picture arrangement information according to the text arrangement sequence and the picture arrangement sequence to obtain a picture-text arrangement sequence;
and fusing the text arrangement information and the picture arrangement information based on the picture-text arrangement sequence to obtain the picture-text mixed arrangement resource.
Optionally, the processing the text resource and the picture resource by calling a format generating interface to generate a text format of the text resource and a picture format of the picture resource includes:
acquiring a text editing instruction for editing the text resource and a picture editing instruction for editing the picture resource;
determining text content, text size and/or text color of text contained in the text resource according to the text editing instruction, and determining picture size, picture coloring format and/or picture resolution of pictures contained in the picture resource according to the picture editing instruction;
and calling the format generation interface to process the text resource based on the text content, the text size and/or the text color to generate the text format, and calling the format generation interface to process the picture resource based on the picture size, the picture coloring format and/or the picture resolution to generate the picture format.
Optionally, the performing mixed arrangement processing according to the text arrangement information and the picture arrangement information to obtain a picture-text mixed arrangement resource includes:
respectively determining the corresponding belonging category according to the text arrangement information and the picture arrangement information;
determining image-text hierarchical distribution based on the text arrangement information and the category to which the picture arrangement information belongs;
determining image-text position distribution according to the image-text hierarchical distribution, the text coverage area corresponding to the text arrangement information and the picture coverage area corresponding to the picture arrangement information;
and fusing the text arrangement information and the picture arrangement information based on the picture-text position distribution to obtain the picture-text mixed arrangement resource.
Optionally, after the substep of determining the distribution of the graphics context positions according to the distribution of the graphics context hierarchy, the text coverage area corresponding to the text arrangement information, and the picture coverage area corresponding to the picture arrangement information is executed, the method further includes:
judging whether the position of the text coverage area and the position of the picture coverage area have position difference or not;
if yes, adjusting the position of the text coverage area and/or the position of the picture coverage area to determine a first optimal image-text position distribution, and executing the substep of fusing the text arrangement information and the picture arrangement information based on the image-text position distribution to obtain the image-text mixed resource;
The method for obtaining the image-text mixed resource comprises the following steps of:
and fusing the text arrangement information and the picture arrangement information based on the first optimal picture-text position distribution to obtain the picture-text mixed arrangement resource.
Optionally, after the substep of determining the distribution position of the graphics context according to the distribution of the graphics context hierarchy, the text coverage area corresponding to the text arrangement information, and the picture coverage area corresponding to the picture arrangement information is executed, the method further includes:
judging whether the area ratio of the text coverage area to the picture coverage area is larger than a preset ratio threshold value or not;
if yes, adjusting the text coverage area and/or the picture coverage area to determine optimal image-text proportion distribution, adjusting the image-text position distribution through the optimal image-text proportion distribution to determine second optimal image-text position distribution, and executing the substep of fusing the text arrangement information and the picture arrangement information based on the image-text position distribution to obtain the image-text mixed resource;
the method for obtaining the image-text mixed resource comprises the following steps of:
And fusing the text arrangement information and the picture arrangement information based on the second optimal picture and text position distribution to obtain the picture and text mixed arrangement resource.
Optionally, the adjusting the text coverage area and/or the picture coverage area to determine an optimal image-text proportion distribution includes:
the optimal image-text proportion distribution is obtained by adjusting the text size of the text corresponding to the text coverage area and adjusting the size of the text coverage area;
and/or the number of the groups of groups,
and adjusting the size of the picture coverage area by adjusting the picture size of the picture corresponding to the picture coverage area, so as to obtain the optimal picture-text proportion distribution.
Optionally, after the step of obtaining the graphic mixed resource is executed, the method further includes:
rendering the graphic mixed resource, and displaying the graphic mixed resource according to a rendering result.
According to a second aspect of embodiments of the present disclosure, there is provided an image-text mixing device, including:
the resource acquisition module is configured to acquire text resources and picture resources to be processed;
the generation format module is configured to process the text resource and the picture resource by calling a format generation interface to generate a text format of the text resource and a picture format of the picture resource;
The analysis module is configured to analyze the text resource and the text format, obtain text arrangement information according to analysis results, analyze the picture resource and the picture format, and obtain picture arrangement information according to analysis results;
and the mixed arrangement processing module is configured to perform mixed arrangement processing according to the text arrangement information and the picture arrangement information to obtain picture-text mixed arrangement resources.
Optionally, the text resource includes a corresponding text arrangement sequence, and the picture resource includes a corresponding picture arrangement sequence;
correspondingly, the mixed-rank processing module comprises:
the arrangement unit is configured to arrange the text arrangement information and the picture arrangement information according to the text arrangement sequence and the picture arrangement sequence to obtain a picture-text arrangement sequence;
the first fusion unit is configured to fuse the text arrangement information and the picture arrangement information based on the picture arrangement sequence to obtain the picture-text mixed arrangement resource.
Optionally, the generating format module includes:
an acquisition editing instruction unit configured to acquire a text editing instruction for editing the text resource and a picture editing instruction for editing the picture resource;
A determining unit configured to determine text content, text size and/or text color of text contained in the text resource according to the text editing instruction, and determine a picture size, a picture coloring format and/or a picture resolution of a picture contained in the picture resource according to the picture editing instruction;
and the generation format unit is configured to call the format generation interface to process the text resource based on the text content, the text size and/or the text color to generate the text format, and call the format generation interface to process the picture resource based on the picture size, the picture coloring format and/or the picture resolution to generate the picture format.
Optionally, the mixed-rank processing module includes:
a category determining unit configured to determine a corresponding category according to the text arrangement information and the picture arrangement information, respectively;
a determining image-text hierarchy distribution unit configured to determine image-text hierarchy distribution based on the text arrangement information and the category to which the picture arrangement information belongs;
the image-text position distribution unit is configured to determine image-text position distribution according to the image-text hierarchical distribution, the text coverage area corresponding to the text arrangement information and the image coverage area corresponding to the image arrangement information;
And the second fusion unit is configured to fuse the text arrangement information and the picture arrangement information based on the picture-text position distribution to obtain the picture-text mixed arrangement resource.
Optionally, the determining the graphic context position distribution unit includes:
the first judging submodule is configured to judge whether a position difference exists between the position of the text coverage area and the position of the picture coverage area;
if yes, the position of the text coverage area and/or the position of the picture coverage area are adjusted to determine first optimal image-text position distribution, and the second fusion unit is operated;
wherein the second fusion unit is further configured to:
and fusing the text arrangement information and the picture arrangement information based on the first optimal picture-text position distribution to obtain the picture-text mixed arrangement resource.
Optionally, the determining the graphic context position distribution unit includes:
a second judging sub-module configured to judge whether the area ratio of the text coverage area to the picture coverage area is greater than a preset ratio threshold;
if yes, adjusting the text coverage area and/or the picture coverage area to determine optimal image-text proportion distribution, adjusting the image-text position distribution through the optimal image-text proportion distribution, determining second optimal image-text position distribution, and operating the second fusion unit;
Wherein the second fusion unit is further configured to:
and fusing the text arrangement information and the picture arrangement information based on the second optimal picture and text position distribution to obtain the picture and text mixed arrangement resource.
Optionally, the adjusting the text coverage area and/or the picture coverage area to determine an optimal image-text proportion distribution includes:
the optimal image-text proportion distribution is obtained by adjusting the text size of the text corresponding to the text coverage area and adjusting the size of the text coverage area;
and/or the number of the groups of groups,
and adjusting the size of the picture coverage area by adjusting the picture size of the picture corresponding to the picture coverage area, so as to obtain the optimal picture-text proportion distribution.
Optionally, the image-text mixing device further includes:
the rendering module is configured to render the graphic mixed resource and display the graphic mixed resource according to a rendering result.
According to a third aspect of embodiments of the present specification, there is provided an electronic device comprising:
a memory and a processor;
the memory is used for storing computer executable instructions, and the processor realizes the steps of the image-text shuffling method when executing the computer executable instructions.
According to a fourth aspect of embodiments of the present description, there is provided a computer readable storage medium storing computer executable instructions which, when executed by a processor, perform the steps of any of the teletext described.
Compared with the prior art, the specification has the following advantages:
the specification provides a graphic and text mixed arrangement method, which comprises the following steps: acquiring a text resource and a picture resource to be processed; processing the text resource and the picture resource by calling a format generation interface to generate a text format of the text resource and a picture format of the picture resource; analyzing the text resource and the text format, obtaining text arrangement information according to an analysis result, analyzing the picture resource and the picture format, and obtaining picture arrangement information according to the analysis result; and carrying out mixed arrangement processing according to the text arrangement information and the picture arrangement information to obtain picture-text mixed arrangement resources.
According to the image-text mixed arrangement method, the text resources and the picture resources are processed respectively, so that the working efficiency of an image-text mixed arrangement processing process is improved, the text resources, the text formats, the picture resources and the picture formats are processed to obtain the text arrangement information and the picture arrangement information, then the text arrangement information and the picture arrangement information are processed in a mixed arrangement mode to obtain the image-text mixed arrangement resources, mixed arrangement of the text and the pictures in various formats is realized, and the richness of the image-text mixed arrangement resources is improved.
Drawings
FIG. 1 is a flowchart of an image-text shuffling method according to an embodiment of the present disclosure;
fig. 2 is a schematic diagram of a picture format generated in an image-text shuffling method according to an embodiment of the present disclosure;
fig. 3 is a schematic diagram of a picture format generated in a second image-text shuffling method according to an embodiment of the present disclosure;
fig. 4 is a schematic diagram of rendering of a graphics-text mixed resource in a graphics-text mixed method according to an embodiment of the present disclosure;
fig. 5 is a schematic diagram of rendering of the graphics context mixing resource in the second graphics context mixing method according to an embodiment of the present disclosure;
fig. 6 is a schematic diagram illustrating adjustment of distribution of graphics and text positions in a graphics and text shuffling method according to an embodiment of the present disclosure;
fig. 7 is a schematic diagram illustrating adjustment of the distribution of the graphics and text proportion in a graphics and text mixing and arranging method according to an embodiment of the present disclosure;
FIG. 8 is a flowchart of a second method for shuffling images and texts according to an embodiment of the present disclosure;
fig. 9 is a schematic structural diagram of an image-text mixing and arranging device according to an embodiment of the present disclosure;
fig. 10 is a block diagram of an electronic device according to an embodiment of the present disclosure.
Detailed Description
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present description. This description may be embodied in many other forms than described herein and similarly generalized by those skilled in the art to whom this disclosure pertains without departing from the spirit of the disclosure and, therefore, this disclosure is not limited by the specific implementations disclosed below.
The terminology used in the one or more embodiments of the specification is for the purpose of describing particular embodiments only and is not intended to be limiting of the one or more embodiments of the specification. As used in this specification, one or more embodiments and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used in one or more embodiments of the present specification refers to and encompasses any or all possible combinations of one or more of the associated listed items.
It should be understood that, although the terms first, second, etc. may be used in one or more embodiments of this specification to describe various information, these information should not be limited by these terms. These terms are only used to distinguish one type of information from another. For example, a first may also be referred to as a second, and similarly, a second may also be referred to as a first, without departing from the scope of one or more embodiments of the present description. The word "if" as used herein may be interpreted as "at … …" or "at … …" or "responsive to a determination", depending on the context.
First, terms related to one or more embodiments of the present invention will be explained.
Unity 3D: the game development tool is a multi-platform comprehensive game development tool which enables players to easily create types of interactive contents such as three-dimensional video games, building visualizations, real-time three-dimensional animations and the like, and is a comprehensive integrated professional game engine.
NGUI: is a Unity plugin strictly following the KISS principle and written in c#, providing a powerful UI system and event notification framework. The code is simple, and most classes are less than 200 lines of codes; illumination mapping, normal mapping, refraction and other characteristics support cutting of hard-sided or flexible panels.
And (5) picture and text mixed arrangement: the characters are mixed and arranged with the pictures, and the characters can be arranged around the pictures, embedded under the pictures, floated above the pictures and the like.
In the specification, a picture and text mixed arrangement method is provided. The present specification relates to a graphic mixing arrangement, an electronic device, and a computer-readable storage medium, and is described in detail in the following embodiments.
The image-text mixed arrangement method provided in an embodiment of the present disclosure is described by referring to the accompanying drawings, including fig. 1 is a flowchart of an image-text mixed arrangement method provided in an embodiment of the present disclosure; fig. 2 is a schematic diagram of a picture format generated in an image-text shuffling method according to an embodiment of the present disclosure; fig. 3 is a schematic diagram of a picture format generated in a second image-text shuffling method according to an embodiment of the present disclosure; fig. 4 is a schematic diagram of rendering of a graphics-text mixed resource in a graphics-text mixed method according to an embodiment of the present disclosure; fig. 5 is a schematic diagram of rendering of the graphics context mixing resource in the second graphics context mixing method according to an embodiment of the present disclosure; fig. 6 is a schematic diagram illustrating adjustment of distribution of graphics and text positions in a graphics and text shuffling method according to an embodiment of the present disclosure; fig. 7 is a schematic diagram illustrating adjustment of the distribution of the graphics and text proportion in a graphics and text mixing and arranging method according to an embodiment of the present disclosure; wherein fig. 1 includes steps 102-108.
Step 102: and acquiring a text resource and a picture resource to be processed.
In one or more embodiments of the present disclosure, the text resource includes text in any format, and the picture resource includes pictures in any format. The text in any format includes: txt format, doc format, docx format, wps format, etc.; the picture in any format comprises: bmp format, jpg format, gif format, raw format, WMF format, and the like. Wherein, users often see or use the picture and text mixed arrangement in the course of playing games or chatting; for example, in game a, a picture of a shoe-shaped gold ingot is displayed on a UI (User Interface) Interface, the number of shoe-shaped gold ingots corresponds to the rear of the picture, and the number of shoe-shaped gold ingots and shoe-shaped gold ingots is displayed to the User, namely, the number of shoe-shaped gold ingots and shoe-shaped gold ingots are displayed in a picture-text mixed arrangement.
Based on the description, the image-text mixed arrangement method is described, a user can communicate with other players in a chat frame of a game frequently in the game playing process, and in order to improve the experience effect of the user in the chat process of the game playing process, a simple expression is added in a chat mechanism of the game, so that the mental activities of the user in the game playing process can be displayed more easily.
In order to provide better game experience and chat experience for users, the image-text mixed arrangement method provided by the specification enables the NGUI to be provided with the text resources and the image resources to be respectively processed, can improve the working efficiency of the image-text mixed arrangement processing process, processes the text resources and the image resources to obtain the text arrangement information and the image arrangement information, and then carries out mixed arrangement processing on the text arrangement information and the image arrangement information, so that the mixed arrangement of texts and various formats of images can be realized, the richness of the image-text mixed arrangement resources is improved, more images except for simple expressions can be sent in the game playing process of users, and the images can be sent together with chat content, so that the experience effect of the users in the game playing process is better.
Specifically, the obtaining a text resource and a picture resource to be processed includes: text content, character types in the text, text extension, whether the text carries information about the text such as links or not; the picture resource comprises the following components: the picture content, the picture extension and whether the picture carries information about the picture such as links or not; and the text resource and the picture resource comprise the picture-text arrangement sequence when the picture-text mixed arrangement processing is carried out.
In the implementation, the acquired text resources to be processed and the picture resources are input by a user; for example, the user provides a session of "hello-! The picture and the picture are pictures of the poster, the acquired text resource to be processed is' hello! The picture resource to be processed is a picture of a poster.
Step 104: and processing the text resource and the picture resource by calling a format generation interface to generate a text format of the text resource and a picture format of the picture resource.
Specifically, according to the obtained text resource and picture resource, a call format generation interface is used for processing the text resource and the picture resource to generate a text format of the text resource and a picture format of the picture resource; wherein the text format includes: formats such as text content, text size, text color and the like in the text; the picture format includes: picture size, picture coloring format, picture resolution, etc.
The format generation interface is created in the NGUI plug-in by mounting picture format codes corresponding to picture formats and text formats to the NGUI plug-in, and under the condition of inputting picture-text mixed arrangement instructions, picture resources and text resources can be processed through the format generation interface to obtain the corresponding picture formats and text formats, and subsequent picture-text mixed arrangement processing is carried out according to the obtained picture formats and the obtained text formats.
In one or more implementations of this embodiment, the text format and the picture format are obtained by calling the format generation interface to process the text resource and the picture resource, and specific implementation manners are as follows:
acquiring a text editing instruction for editing the text resource and a picture editing instruction for editing the picture resource;
determining text content, text size and/or text color of text contained in the text resource according to the text editing instruction, and determining picture size, picture coloring format and/or picture resolution of pictures contained in the picture resource according to the picture editing instruction;
and calling the format generation interface to process the text resource based on the text content, the text size and/or the text color to generate the text format, and calling the format generation interface to process the picture resource based on the picture size, the picture coloring format and/or the picture resolution to generate the picture format.
Specifically, the text editing instruction and the picture editing instruction for editing the text resource and the picture resource are obtained, the text editing instruction and the picture editing instruction are input by a user using an NGUI plug-in, and the editable contents of text in the text resource, such as text content, text size, text color, text type and the like, about text are determined according to the text editing instruction input by the user; determining editable contents of the picture such as picture size, picture coloring format, picture resolution and the like of the picture in the picture resource according to the picture editing instruction input by the user; and processing the text resource and the picture resource according to the text editing instruction and the picture editing instruction input by the user, and generating a text format corresponding to the text editing instruction input by the user and a picture format corresponding to the picture editing instruction.
In practical application, taking the text resource as "good morning" as an example, describing a process of generating a text format, wherein the text editing instruction for editing the "good morning" is obtained as follows: the method comprises the steps of translating 'Good morning' into English, thickening fonts, editing 'Good morning' based on a text editing instruction, and generating a text format of 'Good moving'.
In practical application, a process of generating a picture format is described with reference to fig. 2, referring to fig. 2, for a picture of the sun just rising from the sea level, the obtaining a picture editing instruction for editing in fig. 2 is as follows: the size of fig. 2 is modified into a square picture, the picture is reduced, the fig. 2 is edited based on a picture editing instruction, and the generated picture format is shown in fig. 3.
The text editing instruction aiming at the text resource and the picture editing instruction aiming at the picture resource are acquired, the text resource and the picture resource are respectively processed by calling the format generating interface, the corresponding picture format text format is obtained, the working efficiency of the processing process is improved, the text size or the text color of the text and the picture size or the picture coloring format of the picture can be adjusted, the picture resource and the text resource can be modified at will according to the acquired editing instruction, and the required text format and the required picture format can be acquired.
Step 106: analyzing the text resource and the text format, obtaining text arrangement information according to an analysis result, analyzing the picture resource and the picture format, and obtaining picture arrangement information according to the analysis result.
Specifically, the text resource and the picture resource are processed by calling the format generating interface to obtain the text format and the picture format, the text format and the text resource are further analyzed, the picture format and the picture resource are analyzed, and the text arrangement information and the picture arrangement information are obtained according to analysis results.
Here, by parsing the text resource and the text format, all information about the text can be obtained; for example, if the text resource is "Good in the morning" and the corresponding text format is "Good moving", the text resource and the text format are parsed to obtain text arrangement information as follows: "Good moving", the text content is English hello, and the font is thickened; all information about the picture can be obtained by parsing the picture resources and the picture format; taking the picture resource as an example of fig. 2, and the corresponding picture format is shown in fig. 3, then the picture 2 and the picture 3 are analyzed to obtain the picture arrangement information as follows: gray level pictures, wherein the pictures are square, and the content of the pictures is the sun which just rises at sea; the text arrangement information and the picture arrangement information are information which needs to be processed in the subsequent picture and text mixed arrangement processing process.
For example, there are Text formats in the NGUI plugin of "{" type ":" Text "," fontSize ":22," content ":" [35261E ] you spend "}" and "{" type ": commodity? "the picture format is" { "type": "Img", "icon id": "% d", "width":40, "height":40} ", and text arrangement information is determined to be { type" according to the parsing result: text, font size: 22, text content color: black, literal "you spend" } and { type: text, font size: 22, text content color: the black, the text "refresh grocery store", "merchandise in? "}; the picture arrangement information is { type: picture, picture: (one ingot picture), picture width: 40, picture height: 40}.
In specific implementation, the text resource and the text format are analyzed, and the picture resource and the picture format are analyzed through a preset model or a preset algorithm, for example, the text resource and the text format are analyzed through an analysis model, and the analysis model generates corresponding text arrangement information; the process of parsing the text resource and the text format, and the process of parsing the picture resource and the picture format may be set according to an actual application scenario, which is not limited in this specification.
Step 108: and carrying out mixed arrangement processing according to the text arrangement information and the picture arrangement information to obtain picture-text mixed arrangement resources.
Specifically, the text arrangement information and the picture arrangement information are obtained according to the analysis result, and further, mixed arrangement processing is carried out on the text arrangement information and the picture arrangement information, so that the picture-text mixed arrangement resource is obtained; and the image-text mixed arrangement resource is a resource obtained by mixing pictures and texts to be rendered.
In one or more implementations of this embodiment, the text resource includes a corresponding text arrangement sequence, and the picture resource includes a corresponding picture arrangement sequence, so that a picture-text mixed arrangement resource is further obtained, and a specific implementation manner is as follows:
arranging the text arrangement information and the picture arrangement information according to the text arrangement sequence and the picture arrangement sequence to obtain a picture-text arrangement sequence;
and fusing the text arrangement information and the picture arrangement information based on the picture-text arrangement sequence to obtain the picture-text mixed arrangement resource.
Specifically, the arrangement sequence of the text arrangement information and the picture arrangement information is determined according to the text arrangement sequence contained in the text resource and the picture arrangement sequence contained in the picture resource, the arrangement sequence is used as the picture-text arrangement sequence, and then the text arrangement information and the picture arrangement information are fused according to the picture-text arrangement sequence, so that the picture-text mixed arrangement resource to be rendered is obtained.
On the basis of obtaining the graphics context mixed resource, further, in one or more implementations of the embodiment, rendering the graphics context mixed resource may only be demonstrated, and specific implementation manners are as follows:
rendering the graphic mixed resource, and displaying the graphic mixed resource according to a rendering result.
Referring to fig. 4, still with the text arrangement information described above as { type: text, font size: 22, text content color: black, literal "you spend" } and { type: text, font size: 22, text content color: the black, the text "refresh grocery store", "merchandise in? "}; the picture arrangement information is { type: picture, picture: (one ingot picture), picture width: 40, picture height: 40, for example, the text arrangement information and the picture arrangement information are fused according to a picture-text arrangement sequence, so as to obtain the picture-text mixed arrangement resource, wherein the picture-text arrangement sequence is "whether you spend [ pictures ] to refresh goods in a grocery store? And fusing the text arrangement information and the picture arrangement information according to the picture arrangement sequence to obtain picture-text mixed arrangement resources, and rendering the picture-text mixed arrangement resources to obtain a final display result shown in fig. 4.
The text arrangement information and the picture arrangement information are fused according to the text arrangement sequence and the picture arrangement sequence contained in the text resource and the picture resource to obtain the picture-text mixed arrangement resource, so that the text arrangement information and the picture arrangement information can be fused according to the acquired picture and the arrangement sequence of the text to obtain the picture mixed arrangement resource: and (5) the picture-text mixed resource with the text-picture-text display effect.
In addition, it is also possible to achieve the acquisition: and (3) the picture-text mixed resource with the text-picture or picture-text display effect.
In one or more implementations of this embodiment, the text arrangement information and the picture arrangement information may be fused according to a hierarchical relationship to obtain the graphics context mixed arrangement resource, where a specific implementation manner is as follows:
step 1: respectively determining the corresponding belonging category according to the text arrangement information and the picture arrangement information;
step 2: determining image-text hierarchical distribution based on the text arrangement information and the category to which the picture arrangement information belongs;
step 3: determining image-text position distribution according to the image-text hierarchical distribution, the text coverage area corresponding to the text arrangement information and the picture coverage area corresponding to the picture arrangement information;
Step 4: and fusing the text arrangement information and the picture arrangement information based on the picture-text position distribution to obtain the picture-text mixed arrangement resource.
Specifically, determining the corresponding belonging type as a text according to the text arrangement information, determining the corresponding belonging type as a picture according to the picture arrangement information, and determining the picture-text hierarchical distribution based on the text arrangement information and the category to which the picture arrangement information belongs, wherein the picture-text hierarchical distribution is that the text is at the upper layer and the picture is at the lower layer; under the condition that the image-text layer and distribution are determined, in order to achieve better display effect of the images and texts in the hierarchical relationship, image-text position distribution is determined according to the text coverage area and the image coverage area, and the text arrangement information and the image arrangement information are fused based on the position distribution, so that the image-text mixed arrangement resource is obtained.
On the basis of obtaining the graphics context mixed resource, further, in one or more implementations of the embodiment, rendering the graphics context mixed resource may only be demonstrated, and specific implementation manners are as follows:
rendering the graphic mixed resource, and displaying the graphic mixed resource according to a rendering result.
In practical application, the process of determining the graphics-text mixed resource according to the graphics-text position distribution is described by taking the text as "Good moving" and the picture as an example shown in fig. 3, wherein the upper text is "Good moving" and the lower picture is the content shown in fig. 3, the graphics-text position distribution is determined according to the coverage area of "Good moving" and the coverage area of fig. 3, the text "Good moving" and fig. 3 are fused based on the graphics-text position distribution, the graphics-text mixed resource is obtained, and the graphics-text mixed resource is rendered to obtain the final display result as shown in fig. 5.
On the basis of determining the distribution of the positions of the graphics context according to the distribution of the graphics context hierarchy, the text coverage area and the picture coverage area, further, in one or more implementations of this embodiment, it is determined whether there is a position difference between the position of the text coverage area and the position of the picture coverage area, and specific implementation manners are as follows:
judging whether the position of the text coverage area and the position of the picture coverage area have position difference or not;
if yes, adjusting the position of the text coverage area and/or the position of the picture coverage area to determine a first optimal image-text position distribution, and executing the following step 4 to fuse the text arrangement information and the picture arrangement information based on the image-text position distribution to obtain the image-text mixed resource, and correspondingly, the step 4 fuses the text arrangement information and the picture arrangement information to obtain the image-text mixed resource, specifically, fuse the text arrangement information and the picture arrangement information based on the first optimal image-text position distribution to obtain the image-text mixed resource;
If not, no treatment is carried out.
Specifically, under the condition that the image-text position distribution is determined, whether the text coverage area and the picture coverage area in the image-text position distribution have position differences or not is further judged, wherein the position differences refer to whether the text coverage area and the picture coverage area position distribution meet normal inspection standards or not, for example, if a part of the text coverage area is in the picture coverage area and a part of the text coverage area is out of the picture coverage area, the image-text position distribution can be determined to have the position differences; and under the condition that the position difference exists, adjusting the position of the text coverage area or the position of the picture coverage area to determine first optimal image-text position distribution, or simultaneously adjusting the position of the text coverage area and the position of the picture coverage area to determine first optimal image-text position distribution, fusing the text arrangement information and the picture arrangement information based on the first optimal image-text position distribution to obtain the image-text mixed arrangement resource, and under the condition that the position difference does not exist, performing no processing.
In practical application, referring to fig. 6, fig. 6 (a) and fig. 6 (b) are included, and the position difference is described with reference to fig. 6, where the text coverage area is "Good moving", and the picture coverage area is the sun that just rises at sea; referring to fig. 6 (a), there is a position difference between the position of the text coverage area and the position of the picture coverage area, and the position of the text coverage area is adjusted to determine the optimal picture-text position distribution as shown in fig. 6 (b).
On the basis of determining the distribution of the image-text positions according to the distribution of the image-text hierarchy, the text coverage area and the picture coverage area, further, in one or more implementations of this embodiment, it is determined whether the area ratio of the text coverage area to the picture coverage area is greater than a preset ratio threshold, and specific implementation manners are as follows:
judging whether the area ratio of the text coverage area to the picture coverage area is larger than a preset ratio threshold value or not;
if yes, adjusting the text coverage area and/or the picture coverage area to determine optimal image-text proportion distribution, adjusting the image-text position distribution through the optimal image-text proportion distribution to determine second optimal image-text position distribution, and executing the subsequent step 4 to fuse the text arrangement information and the picture arrangement information based on the image-text position distribution to obtain the image-text mixed resource, and correspondingly, the step 4 fuses the text arrangement information and the picture arrangement information to obtain the image-text mixed resource, specifically to fuse the text arrangement information and the picture arrangement information based on the second optimal image-text position distribution to obtain the image-text mixed resource;
If not, no treatment is carried out.
On the basis of the above determination that the area proportion is greater than the preset proportion threshold, further, in one or more implementations of this embodiment, the text coverage area and/or the picture coverage area are adjusted, and specific implementation manners are as follows:
the optimal image-text proportion distribution is obtained by adjusting the text size of the text corresponding to the text coverage area and adjusting the size of the text coverage area;
and/or the number of the groups of groups,
and adjusting the size of the picture coverage area by adjusting the picture size of the picture corresponding to the picture coverage area, so as to obtain the optimal picture-text proportion distribution.
Specifically, under the condition that the image-text position distribution is determined, whether the area ratio of the text coverage area to the image coverage area is larger than a preset ratio threshold value is further judged; and under the condition that the area proportion is larger than the preset proportion threshold, the text arrangement information and the picture arrangement information are fused based on the second optimal picture arrangement position distribution, so that the picture-text mixed arrangement resource is obtained, and under the condition that the area proportion is smaller than the preset proportion threshold, no processing is performed.
In practical application, referring to fig. 7, fig. 7 (c) and fig. 7 (d) are included, and a description is made on whether the area ratio is greater than a preset ratio threshold with reference to fig. 7, where the text coverage area is "Good moving", and the picture coverage area is the sun that just rises at sea; the preset proportion threshold is 50%, as shown in fig. 7 (c), the area proportion of the text coverage area to the picture coverage area is greater than the preset proportion threshold by 50%, the area proportion is smaller than the preset proportion threshold by adjusting the size of the font of the text coverage area "Good moving", the optimal image-text proportion distribution is determined, after the size of the font of the text coverage area "Good moving" is adjusted, the position of the text coverage area may change, and the optimal image-text position distribution is determined based on the adjusted image-text position distribution of the text coverage area as shown in fig. 7 (d).
Determining image-text level distribution according to the text arrangement information and the image arrangement information, determining image-text position distribution based on the image-text level distribution, a text coverage area corresponding to the text arrangement information and an image coverage area corresponding to the image arrangement information, and obtaining optimal image-text position distribution by adjusting the position of an image, the position of the text or the adjustment area proportion under the condition that the image and the text position are different or the area proportion of the image coverage area and the text coverage area is larger than a preset proportion threshold value, and fusing the text arrangement information and the image arrangement information based on the optimal image-text position distribution to obtain image-text mixed arrangement resources with the best display effect.
According to the picture-text mixed arrangement method, the text resources and the picture resources are processed respectively, so that the working efficiency of a picture-text mixed arrangement processing process is improved, the picture resources and the picture resources can be modified at will according to the acquired editing instructions, the required text formats and picture formats can be acquired, the text resources and the text formats as well as the picture resources and the picture formats are processed, the text arrangement information and the picture arrangement information are obtained, then the text arrangement information and the picture arrangement information are subjected to mixed arrangement processing, the picture-text mixed arrangement resource is obtained, mixed arrangement of pictures in a text and multiple formats is realized, multiple combination modes of the texts and the pictures are also realized, and the richness of the picture-text mixed arrangement resource is improved.
The following is a description of the image-text mixing method provided in the present specification, taking the image-text mixing method in the game as an example, with reference to fig. 8. Fig. 8 is a flowchart of a second method for shuffling graphics, according to an embodiment of the present disclosure, where specific steps include steps 802 to 822.
Step 802: and acquiring text resources and picture resources.
Specifically, the text resource is "huge sword", and the picture resource is a huge sword picture.
Step 804: and determining the text type and the text color according to the text editing instruction, and determining the picture coloring format and the picture size according to the picture editing instruction.
Specifically, according to the edit instruction input by the user, determining the text edit instruction as: the text type is set as Chinese, the text color is set as black, and the picture editing instruction is as follows: the picture coloring format is set to grayscale and the picture size is set to 3*3.
Step 806: processing the text resource according to the text type and the text color calling format generating interface to generate a text format, and processing the picture resource according to the picture coloring format and the picture size calling format generating interface to generate a picture format.
Specifically, the text resource is processed based on the text type and the text color calling format generating interface, the generated text format is a black character and the color is black, the picture resource is processed based on the picture coloring format and the picture size calling format generating interface, and the generated picture is a black-and-white giant sword picture with the picture format of 3*3.
Step 808: and analyzing the text resource and the text format to obtain text arrangement information, and analyzing the picture resource and the picture format to obtain picture arrangement information.
Step 810: and determining the image-text hierarchical distribution according to the text arrangement information and the type of the image arrangement information.
Specifically, the text arrangement information and the picture arrangement information are overlapped, the text arrangement information is arranged on the upper layer, and the picture arrangement information is arranged on the lower layer.
Step 812: judging whether the area ratio of the text coverage area corresponding to the text arrangement information and the picture coverage area corresponding to the picture arrangement information is larger than a preset ratio threshold value or not; if yes, go to step 814; if not, no processing is performed.
Specifically, whether the area proportion is larger than a preset proportion threshold value is to judge whether the characters are too large or not, the pictures are too small, the proportion of the pictures is unreasonable, and whether the pictures are too large or not, the characters are too small, and the proportion of the pictures is unreasonable.
Step 814: and adjusting the text size and/or the picture size.
Specifically, under the condition that the text is too large and the picture is too small, the text is turned down or the picture is turned up, so that the area ratio of the text coverage area to the picture coverage area is smaller than or equal to a threshold value; under the condition that the text is too small and the picture is too large, the text is enlarged or the picture is lowered, so that the area ratio of the text coverage area to the picture coverage area is smaller than or equal to a threshold value.
Step 816: judging whether the position of the text coverage area and the position of the picture coverage area have position difference or not; if yes, go to step 818; if not, no processing is performed.
Specifically, whether the position of the text coverage area and the position of the picture coverage area have position difference is to judge whether the position of the text coverage area and the position of the picture coverage area are reasonable or not.
Step 818: and adjusting the position of the text coverage area and/or the position of the picture coverage area based on the adjusted text size and picture size.
Specifically, under the condition that the area proportion of the coverage area corresponding to the character size and the picture size is proper, the 'huge sword' two words are placed on the right of the huge sword in the picture, so that the coverage area corresponding to the 'huge sword' two words does not exceed the picture coverage area, and the 'huge sword' two words can not shade the sword body of the huge sword in the picture.
Step 820: and fusing the text arrangement information and the picture arrangement information to obtain the picture-text mixed arrangement resource.
Specifically, the arrangement information and the picture arrangement information are fused according to the adjusted text size and/or the adjusted picture size and the adjusted position of the text coverage area and/or the adjusted position of the picture coverage area, so that the picture-text mixed arrangement resource is obtained.
Step 822: rendering the graphic mixed resource, and displaying the graphic mixed resource according to the rendering result.
Specifically, the rendered picture is a huge sword, and two words of 'huge sword' are arranged on the right of the huge sword, and the format of the picture is a 3*3 gray-scale picture.
According to the picture-text mixed arrangement method, the text resources and the picture resources are processed respectively, so that the working efficiency of a picture-text mixed arrangement processing process is improved, the picture resources and the text resources can be modified according to editing instructions input by a user, required text formats and picture formats can be obtained, the text resources and the text formats as well as the picture resources and the picture formats are processed, text arrangement information and picture arrangement information are obtained, then the text arrangement information and the picture arrangement information are fused, the picture-text mixed arrangement resources are obtained, mixed arrangement of pictures in a text and multiple formats is realized, multiple combination modes of the texts and the pictures are also realized, and the richness of the picture-text mixed arrangement resources is improved.
Corresponding to the above method embodiment, the present disclosure further provides an embodiment of the graphics context mixing device, and fig. 9 shows a schematic structural diagram of the graphics context mixing device according to an embodiment of the present disclosure. As shown in fig. 9, the apparatus includes:
An acquisition resource module 902 configured to acquire text resources and picture resources to be processed;
a generating format module 904 configured to process the text resource and the picture resource by calling a format generating interface, and generate a text format of the text resource and a picture format of the picture resource;
the parsing module 906 is configured to parse the text resource and the text format, obtain text arrangement information according to a parsing result, parse the picture resource and the picture format, and obtain picture arrangement information according to a parsing result;
and the mixed-arrangement processing module 908 is configured to perform mixed-arrangement processing according to the text arrangement information and the picture arrangement information to obtain picture-text mixed-arrangement resources.
In an optional embodiment, the text resource includes a corresponding text arrangement sequence, and the picture resource includes a corresponding picture arrangement sequence;
accordingly, the mixed-rank processing module 908 includes:
the arrangement unit is configured to arrange the text arrangement information and the picture arrangement information according to the text arrangement sequence and the picture arrangement sequence to obtain a picture-text arrangement sequence;
The first fusion unit is configured to fuse the text arrangement information and the picture arrangement information based on the picture arrangement sequence to obtain the picture-text mixed arrangement resource.
In an alternative embodiment, the generating format module 904 includes:
an acquisition editing instruction unit configured to acquire a text editing instruction for editing the text resource and a picture editing instruction for editing the picture resource;
a determining unit configured to determine text content, text size and/or text color of text contained in the text resource according to the text editing instruction, and determine a picture size, a picture coloring format and/or a picture resolution of a picture contained in the picture resource according to the picture editing instruction;
and the generation format unit is configured to call the format generation interface to process the text resource based on the text content, the text size and/or the text color to generate the text format, and call the format generation interface to process the picture resource based on the picture size, the picture coloring format and/or the picture resolution to generate the picture format.
In an alternative embodiment, the shuffling processing module 908 includes:
a category determining unit configured to determine a corresponding category according to the text arrangement information and the picture arrangement information, respectively;
a determining image-text hierarchy distribution unit configured to determine image-text hierarchy distribution based on the text arrangement information and the category to which the picture arrangement information belongs;
the image-text position distribution unit is configured to determine image-text position distribution according to the image-text hierarchical distribution, the text coverage area corresponding to the text arrangement information and the image coverage area corresponding to the image arrangement information;
and the second fusion unit is configured to fuse the text arrangement information and the picture arrangement information based on the picture-text position distribution to obtain the picture-text mixed arrangement resource.
In an alternative embodiment, the determining the teletext position distribution unit includes:
the first judging submodule is configured to judge whether a position difference exists between the position of the text coverage area and the position of the picture coverage area;
if yes, the position of the text coverage area and/or the position of the picture coverage area are adjusted to determine first optimal image-text position distribution, and the second fusion unit is operated;
Wherein the second fusion unit is further configured to:
and fusing the text arrangement information and the picture arrangement information based on the first optimal picture-text position distribution to obtain the picture-text mixed arrangement resource.
In an alternative embodiment, the determining the teletext position distribution unit includes:
a second judging sub-module configured to judge whether the area ratio of the text coverage area to the picture coverage area is greater than a preset ratio threshold;
if yes, adjusting the text coverage area and/or the picture coverage area to determine optimal image-text proportion distribution, adjusting the image-text position distribution through the optimal image-text proportion distribution, determining second optimal image-text position distribution, and operating the second fusion unit;
wherein the second fusion unit is further configured to:
and fusing the text arrangement information and the picture arrangement information based on the second optimal picture and text position distribution to obtain the picture and text mixed arrangement resource.
In an alternative embodiment, said adjusting the text coverage area and/or the picture coverage area to determine the optimal image-text ratio distribution includes:
The optimal image-text proportion distribution is obtained by adjusting the text size of the text corresponding to the text coverage area and adjusting the size of the text coverage area;
and/or the number of the groups of groups,
and adjusting the size of the picture coverage area by adjusting the picture size of the picture corresponding to the picture coverage area, so as to obtain the optimal picture-text proportion distribution.
In an optional embodiment, the image-text mixing device further includes:
the rendering module is configured to render the graphic mixed resource and display the graphic mixed resource according to a rendering result.
According to the image-text mixed arrangement device, the text resources and the image resources are processed respectively, so that the working efficiency of an image-text mixed arrangement processing process is improved, the image resources and the image resources can be modified at will according to the acquired editing instructions, the required text formats and the required image formats can be acquired, the text resources and the text formats as well as the image resources and the image formats are processed, the text arrangement information and the image arrangement information are obtained, then the text arrangement information and the image arrangement information are subjected to mixed arrangement processing, the image-text mixed arrangement resource is obtained, mixed arrangement of the images in various formats is realized, various combination modes of the texts and the images are realized, and the richness of the image-text mixed arrangement resource is improved.
The above is a schematic scheme of the image-text mixing arrangement device in this embodiment. It should be noted that, the technical solution of the image-text mixing and arranging device and the technical solution of the image-text mixing and arranging method belong to the same conception, and the details of the technical solution of the image-text mixing and arranging device which are not described in detail can be referred to the description of the technical solution of the image-text mixing and arranging method.
Fig. 10 shows a block diagram of an electronic device 1000 according to an embodiment of the present description. The components of the electronic device 1000 include, but are not limited to, a memory 1010 and a processor 1020. Processor 1020 is coupled to memory 1010 via bus 1030 and database 1050 is used to store data.
Electronic device 1000 also includes access device 1040, which access device 1040 enables electronic device 1000 to communicate via one or more networks 1060. Examples of such networks include the Public Switched Telephone Network (PSTN), a Local Area Network (LAN), a Wide Area Network (WAN), a Personal Area Network (PAN), or a combination of communication networks such as the internet. The access device 1040 may include one or more of any type of network interface, wired or wireless (e.g., a Network Interface Card (NIC)), such as an IEEE802.11 Wireless Local Area Network (WLAN) wireless interface, a worldwide interoperability for microwave access (Wi-MAX) interface, an ethernet interface, a Universal Serial Bus (USB) interface, a cellular network interface, a bluetooth interface, a Near Field Communication (NFC) interface, and so forth.
In one embodiment of the present disclosure, the above-described components of the electronic device 1000 and other components not shown in fig. 10 may also be connected to each other, for example, by a bus. It should be understood that the block diagram of the electronic device shown in fig. 10 is for exemplary purposes only and is not intended to limit the scope of the present disclosure. Those skilled in the art may add or replace other components as desired.
Electronic device 1000 may be any type of stationary or mobile electronic device including a mobile computer or mobile electronic device (e.g., tablet, personal digital assistant, laptop, notebook, netbook, etc.), mobile telephone (e.g., smart phone), wearable electronic device (e.g., smart watch, smart glasses, etc.), or other type of mobile device, or a stationary electronic device such as a desktop computer or PC. The electronic device 1000 may also be a mobile or stationary server.
Wherein the processor 1020 is configured to execute the following computer-executable instructions:
acquiring a text resource and a picture resource to be processed;
processing the text resource and the picture resource by calling a format generation interface to generate a text format of the text resource and a picture format of the picture resource;
Analyzing the text resource and the text format, obtaining text arrangement information according to an analysis result, analyzing the picture resource and the picture format, and obtaining picture arrangement information according to the analysis result;
and carrying out mixed arrangement processing according to the text arrangement information and the picture arrangement information to obtain picture-text mixed arrangement resources.
Optionally, the text resource includes a corresponding text arrangement sequence, and the picture resource includes a corresponding picture arrangement sequence;
correspondingly, the performing mixed arrangement processing according to the text arrangement information and the picture arrangement information to obtain picture-text mixed arrangement resources comprises the following steps:
arranging the text arrangement information and the picture arrangement information according to the text arrangement sequence and the picture arrangement sequence to obtain a picture-text arrangement sequence;
and fusing the text arrangement information and the picture arrangement information based on the picture-text arrangement sequence to obtain the picture-text mixed arrangement resource.
Optionally, the processing the text resource and the picture resource by calling a format generating interface to generate a text format of the text resource and a picture format of the picture resource includes:
Acquiring a text editing instruction for editing the text resource and a picture editing instruction for editing the picture resource;
determining text content, text size and/or text color of text contained in the text resource according to the text editing instruction, and determining picture size, picture coloring format and/or picture resolution of pictures contained in the picture resource according to the picture editing instruction;
and calling the format generation interface to process the text resource based on the text content, the text size and/or the text color to generate the text format, and calling the format generation interface to process the picture resource based on the picture size, the picture coloring format and/or the picture resolution to generate the picture format.
Optionally, the performing mixed arrangement processing according to the text arrangement information and the picture arrangement information to obtain a picture-text mixed arrangement resource includes:
respectively determining the corresponding belonging category according to the text arrangement information and the picture arrangement information;
determining image-text hierarchical distribution based on the text arrangement information and the category to which the picture arrangement information belongs;
Determining image-text position distribution according to the image-text hierarchical distribution, the text coverage area corresponding to the text arrangement information and the picture coverage area corresponding to the picture arrangement information;
and fusing the text arrangement information and the picture arrangement information based on the picture-text position distribution to obtain the picture-text mixed arrangement resource.
Optionally, after the substep of determining the distribution of the graphics context positions according to the distribution of the graphics context hierarchy, the text coverage area corresponding to the text arrangement information, and the picture coverage area corresponding to the picture arrangement information is executed, the method further includes:
judging whether the position of the text coverage area and the position of the picture coverage area have position difference or not;
if yes, adjusting the position of the text coverage area and/or the position of the picture coverage area to determine a first optimal image-text position distribution, and executing the substep of fusing the text arrangement information and the picture arrangement information based on the image-text position distribution to obtain the image-text mixed resource;
the method for obtaining the image-text mixed resource comprises the following steps of:
And fusing the text arrangement information and the picture arrangement information based on the first optimal picture-text position distribution to obtain the picture-text mixed arrangement resource.
Optionally, after the substep of determining the distribution position of the graphics context according to the distribution of the graphics context hierarchy, the text coverage area corresponding to the text arrangement information, and the picture coverage area corresponding to the picture arrangement information is executed, the method further includes:
judging whether the area ratio of the text coverage area to the picture coverage area is larger than a preset ratio threshold value or not;
if yes, adjusting the text coverage area and/or the picture coverage area to determine optimal image-text proportion distribution, adjusting the image-text position distribution through the optimal image-text proportion distribution to determine second optimal image-text position distribution, and executing the substep of fusing the text arrangement information and the picture arrangement information based on the image-text position distribution to obtain the image-text mixed resource;
the method for obtaining the image-text mixed resource comprises the following steps of:
and fusing the text arrangement information and the picture arrangement information based on the second optimal picture and text position distribution to obtain the picture and text mixed arrangement resource.
Optionally, the adjusting the text coverage area and/or the picture coverage area to determine an optimal image-text proportion distribution includes:
the optimal image-text proportion distribution is obtained by adjusting the text size of the text corresponding to the text coverage area and adjusting the size of the text coverage area;
and/or the number of the groups of groups,
and adjusting the size of the picture coverage area by adjusting the picture size of the picture corresponding to the picture coverage area, so as to obtain the optimal picture-text proportion distribution.
Optionally, after the step of obtaining the graphic mixed resource is executed, the method further includes:
rendering the graphic mixed resource, and displaying the graphic mixed resource according to a rendering result.
The above is a schematic solution of an electronic device of the present embodiment. It should be noted that, the technical solution of the electronic device and the technical solution of the graphics context mixing method belong to the same conception, and details of the technical solution of the electronic device, which are not described in detail, can be referred to the description of the technical solution of the graphics context mixing method.
An embodiment of the present disclosure also provides a computer-readable storage medium storing computer instructions that, when executed by a processor, implement the steps of the teletext method as described above.
The above is an exemplary version of a computer-readable storage medium of the present embodiment. It should be noted that, the technical solution of the storage medium and the technical solution of the graphics context mixing method belong to the same conception, and details of the technical solution of the storage medium which are not described in detail can be referred to the description of the technical solution of the graphics context mixing method.
The foregoing describes specific embodiments of the present disclosure. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims can be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
The computer instructions include computer program code that may be in source code form, object code form, executable file or some intermediate form, etc. The computer readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a U disk, a removable hard disk, a magnetic disk, an optical disk, a computer Memory, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), an electrical carrier signal, a telecommunications signal, a software distribution medium, and so forth. It should be noted that the computer readable medium contains content that can be appropriately scaled according to the requirements of jurisdictions in which such content is subject to legislation and patent practice, such as in certain jurisdictions in which such content is subject to legislation and patent practice, the computer readable medium does not include electrical carrier signals and telecommunication signals.
It should be noted that, for the sake of simplicity of description, the foregoing method embodiments are all expressed as a series of combinations of actions, but it should be understood by those skilled in the art that the present description is not limited by the order of actions described, as some steps may be performed in other order or simultaneously in accordance with the present description. Further, those skilled in the art will appreciate that the embodiments described in the specification are all preferred embodiments, and that the acts and modules referred to are not necessarily all necessary in the specification.
In the foregoing embodiments, the descriptions of the embodiments are emphasized, and for parts of one embodiment that are not described in detail, reference may be made to the related descriptions of other embodiments.
The preferred embodiments of the present specification disclosed above are merely used to help clarify the present specification. Alternative embodiments are not intended to be exhaustive or to limit the invention to the precise form disclosed. Obviously, many modifications and variations are possible in light of the above teaching. The embodiments were chosen and described in order to best explain the principles of the disclosure and the practical application, to thereby enable others skilled in the art to best understand and utilize the disclosure. This specification is to be limited only by the claims and the full scope and equivalents thereof.

Claims (18)

1. The image-text mixed arrangement method is characterized by comprising the following steps of:
acquiring a text resource and a picture resource to be processed;
processing the text resource and the picture resource by calling a format generation interface to generate a text format of the text resource and a picture format of the picture resource;
analyzing the text resource and the text format, obtaining text arrangement information according to an analysis result, analyzing the picture resource and the picture format, and obtaining picture arrangement information according to the analysis result;
performing mixed arrangement processing according to the text arrangement information and the picture arrangement information, and fusing the text arrangement information and the picture arrangement information to obtain picture-text mixed arrangement resources, wherein the fusing at least comprises inserting pictures into texts and/or superposing the texts on the pictures;
the method for performing mixed arrangement processing according to the text arrangement information and the picture arrangement information, fusing the text arrangement information and the picture arrangement information, includes: determining image-text level distribution according to the text arrangement information and the image arrangement information, obtaining image-text position distribution based on the image-text level distribution, a text coverage area corresponding to the text arrangement information and an image coverage area corresponding to the image arrangement information, and obtaining optimal image-text position distribution by adjusting the position of an image, the position of the text or the adjustment area proportion under the condition that the image and the text position are different or the area proportion of the image coverage area and the text coverage area is larger than a preset proportion threshold value, and fusing the text arrangement information and the image arrangement information based on the optimal image-text position distribution.
2. The method according to claim 1, wherein the text resource includes a corresponding text arrangement sequence, and the picture resource includes a corresponding picture arrangement sequence;
correspondingly, the performing mixed arrangement processing according to the text arrangement information and the picture arrangement information to obtain picture-text mixed arrangement resources comprises the following steps:
arranging the text arrangement information and the picture arrangement information according to the text arrangement sequence and the picture arrangement sequence to obtain a picture-text arrangement sequence;
and fusing the text arrangement information and the picture arrangement information based on the picture-text arrangement sequence to obtain the picture-text mixed arrangement resource.
3. The method according to claim 1, wherein the processing the text resource and the picture resource by calling a format generating interface to generate a text format of the text resource and a picture format of the picture resource includes:
acquiring a text editing instruction for editing the text resource and a picture editing instruction for editing the picture resource; determining text content, text size and/or text color of text contained in the text resource according to the text editing instruction, and determining picture size, picture coloring format and/or picture resolution of pictures contained in the picture resource according to the picture editing instruction;
And calling the format generation interface to process the text resource based on the text content, the text size and/or the text color to generate the text format, and calling the format generation interface to process the picture resource based on the picture size, the picture coloring format and/or the picture resolution to generate the picture format.
4. The method of claim 1, wherein the performing the shuffling process according to the text arrangement information and the picture arrangement information to obtain a graphics-text shuffling resource includes:
respectively determining the corresponding belonging category according to the text arrangement information and the picture arrangement information;
determining image-text position distribution according to the image-text hierarchical distribution, the text coverage area corresponding to the text arrangement information and the picture coverage area corresponding to the picture arrangement information;
and fusing the text arrangement information and the picture arrangement information based on the picture-text position distribution to obtain the picture-text mixed arrangement resource.
5. The method according to claim 4, wherein after the substep of determining the distribution of the graphics context positions according to the distribution of the graphics context hierarchy, the text coverage area corresponding to the text arrangement information, and the picture coverage area corresponding to the picture arrangement information is performed, the method further comprises:
Judging whether the position of the text coverage area and the position of the picture coverage area have position difference or not;
if yes, adjusting the position of the text coverage area and/or the position of the picture coverage area to determine a first optimal image-text position distribution, and executing the substep of fusing the text arrangement information and the picture arrangement information based on the image-text position distribution to obtain the image-text mixed resource;
the method for obtaining the image-text mixed resource comprises the following steps of:
and fusing the text arrangement information and the picture arrangement information based on the first optimal picture-text position distribution to obtain the picture-text mixed arrangement resource.
6. The method according to claim 4, wherein after the substep of determining the distribution position of the graphics context according to the distribution of the graphics context hierarchy, the text coverage area corresponding to the text arrangement information, and the picture coverage area corresponding to the picture arrangement information is performed, the method further comprises:
judging whether the area ratio of the text coverage area to the picture coverage area is larger than a preset ratio threshold value or not;
If yes, adjusting the text coverage area and/or the picture coverage area to determine optimal image-text proportion distribution, adjusting the image-text position distribution through the optimal image-text proportion distribution to determine second optimal image-text position distribution, and executing the substep of fusing the text arrangement information and the picture arrangement information based on the image-text position distribution to obtain the image-text mixed resource;
the method for obtaining the image-text mixed resource comprises the following steps of:
and fusing the text arrangement information and the picture arrangement information based on the second optimal picture and text position distribution to obtain the picture and text mixed arrangement resource.
7. The method of claim 6, wherein said adjusting the text coverage area and/or the picture coverage area to determine an optimal distribution of the graphics scale comprises:
the optimal image-text proportion distribution is obtained by adjusting the text size of the text corresponding to the text coverage area and adjusting the size of the text coverage area;
and/or the number of the groups of groups,
and adjusting the size of the picture coverage area by adjusting the picture size of the picture corresponding to the picture coverage area, so as to obtain the optimal picture-text proportion distribution.
8. The method according to claim 1, wherein after the step of obtaining the graphic mixed resource is performed, the method further comprises:
rendering the graphic mixed resource, and displaying the graphic mixed resource according to a rendering result.
9. The utility model provides a picture and text mixed arrangement device which characterized in that includes:
the resource acquisition module is configured to acquire text resources and picture resources to be processed;
the generation format module is configured to process the text resource and the picture resource by calling a format generation interface to generate a text format of the text resource and a picture format of the picture resource;
the analysis module is configured to analyze the text resource and the text format, obtain text arrangement information according to analysis results, analyze the picture resource and the picture format, and obtain picture arrangement information according to analysis results;
the mixed arrangement processing module is configured to perform mixed arrangement processing according to the text arrangement information and the picture arrangement information, fuse the text arrangement information and the picture arrangement information to obtain a picture-text mixed arrangement resource, wherein the fusing at least comprises inserting a picture into a text and/or superposing the text on the picture, the mixed arrangement processing is performed according to the text arrangement information and the picture arrangement information, and the text arrangement information and the picture arrangement information are fused, and the mixed arrangement processing comprises the following steps: determining image-text level distribution according to the text arrangement information and the image arrangement information, obtaining image-text position distribution based on the image-text level distribution, a text coverage area corresponding to the text arrangement information and an image coverage area corresponding to the image arrangement information, and obtaining optimal image-text position distribution by adjusting the position of an image, the position of the text or the adjustment area proportion under the condition that the image and the text position are different or the area proportion of the image coverage area and the text coverage area is larger than a preset proportion threshold value, and fusing the text arrangement information and the image arrangement information based on the optimal image-text position distribution.
10. The graphic mixing arrangement apparatus according to claim 9, wherein the text resource includes a corresponding text arrangement sequence, and the picture resource includes a corresponding picture arrangement sequence;
correspondingly, the mixed-rank processing module comprises:
the arrangement unit is configured to arrange the text arrangement information and the picture arrangement information according to the text arrangement sequence and the picture arrangement sequence to obtain a picture-text arrangement sequence;
the first fusion unit is configured to fuse the text arrangement information and the picture arrangement information based on the picture arrangement sequence to obtain the picture-text mixed arrangement resource.
11. The teletext mixing arrangement according to claim 9, wherein the generating format module comprises:
an acquisition editing instruction unit configured to acquire a text editing instruction for editing the text resource and a picture editing instruction for editing the picture resource;
a determining unit configured to determine text content, text size and/or text color of text contained in the text resource according to the text editing instruction, and determine a picture size, a picture coloring format and/or a picture resolution of a picture contained in the picture resource according to the picture editing instruction;
And the generation format unit is configured to call the format generation interface to process the text resource based on the text content, the text size and/or the text color to generate the text format, and call the format generation interface to process the picture resource based on the picture size, the picture coloring format and/or the picture resolution to generate the picture format.
12. The graphics context mixing device according to claim 9, wherein the mixing processing module comprises:
a category determining unit configured to determine a corresponding category according to the text arrangement information and the picture arrangement information, respectively;
the image-text position distribution unit is configured to determine image-text position distribution according to the image-text hierarchical distribution, the text coverage area corresponding to the text arrangement information and the image coverage area corresponding to the image arrangement information;
and the second fusion unit is configured to fuse the text arrangement information and the picture arrangement information based on the picture-text position distribution to obtain the picture-text mixed arrangement resource.
13. The graphic mixing device according to claim 12, wherein the determining graphic location distribution unit includes:
The first judging submodule is configured to judge whether a position difference exists between the position of the text coverage area and the position of the picture coverage area;
if yes, the position of the text coverage area and/or the position of the picture coverage area are adjusted to determine first optimal image-text position distribution, and the second fusion unit is operated;
wherein the second fusion unit is further configured to:
and fusing the text arrangement information and the picture arrangement information based on the first optimal picture-text position distribution to obtain the picture-text mixed arrangement resource.
14. The graphic mixing device according to claim 12, wherein the determining graphic location distribution unit includes:
a second judging sub-module configured to judge whether the area ratio of the text coverage area to the picture coverage area is greater than a preset ratio threshold;
if yes, adjusting the text coverage area and/or the picture coverage area to determine optimal image-text proportion distribution, adjusting the image-text position distribution through the optimal image-text proportion distribution, determining second optimal image-text position distribution, and operating the second fusion unit;
Wherein the second fusion unit is further configured to:
and fusing the text arrangement information and the picture arrangement information based on the second optimal picture and text position distribution to obtain the picture and text mixed arrangement resource.
15. The teletext arrangement according to claim 14, wherein the adjusting the text coverage area and/or the picture coverage area to determine an optimal teletext proportion distribution comprises: the optimal image-text proportion distribution is obtained by adjusting the text size of the text corresponding to the text coverage area and adjusting the size of the text coverage area;
and/or the number of the groups of groups,
and adjusting the size of the picture coverage area by adjusting the picture size of the picture corresponding to the picture coverage area, so as to obtain the optimal picture-text proportion distribution.
16. The teletext mixing arrangement according to claim 9, further comprising:
the rendering module is configured to render the graphic mixed resource and display the graphic mixed resource according to a rendering result.
17. An electronic device, comprising:
a memory and a processor;
the memory is configured to store computer executable instructions and the processor is configured to execute the computer executable instructions to implement the steps of the teletext method according to any one of claims 1-8.
18. A computer readable storage medium storing computer instructions which, when executed by a processor, implement the steps of the teletext method according to any one of claims 1 to 8.
CN201910860352.7A 2019-09-11 2019-09-11 Image-text mixed arrangement method and device, electronic equipment and storage medium Active CN110548290B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910860352.7A CN110548290B (en) 2019-09-11 2019-09-11 Image-text mixed arrangement method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910860352.7A CN110548290B (en) 2019-09-11 2019-09-11 Image-text mixed arrangement method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN110548290A CN110548290A (en) 2019-12-10
CN110548290B true CN110548290B (en) 2023-10-03

Family

ID=68740017

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910860352.7A Active CN110548290B (en) 2019-09-11 2019-09-11 Image-text mixed arrangement method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN110548290B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112764854A (en) * 2021-01-19 2021-05-07 广州虎牙科技有限公司 Image-text mixed display method and related device and equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016023471A1 (en) * 2014-08-11 2016-02-18 张锐 Methods for processing handwritten inputted characters, splitting and merging data and encoding and decoding processing
CN106294874A (en) * 2016-08-24 2017-01-04 北京奇虎科技有限公司 Carry out the method and apparatus of picture and text mixing, immediate communication device in instant messaging
CN107230241A (en) * 2017-06-29 2017-10-03 武汉斗鱼网络科技有限公司 Picture and text mixing implementation method and device
CN108966036A (en) * 2018-06-26 2018-12-07 掌阅科技股份有限公司 Barrage display methods, electronic equipment and computer storage medium
CN110162653A (en) * 2019-05-13 2019-08-23 北京百度网讯科技有限公司 A kind of picture and text sort recommendations method and terminal device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016023471A1 (en) * 2014-08-11 2016-02-18 张锐 Methods for processing handwritten inputted characters, splitting and merging data and encoding and decoding processing
CN106294874A (en) * 2016-08-24 2017-01-04 北京奇虎科技有限公司 Carry out the method and apparatus of picture and text mixing, immediate communication device in instant messaging
CN107230241A (en) * 2017-06-29 2017-10-03 武汉斗鱼网络科技有限公司 Picture and text mixing implementation method and device
CN108966036A (en) * 2018-06-26 2018-12-07 掌阅科技股份有限公司 Barrage display methods, electronic equipment and computer storage medium
CN110162653A (en) * 2019-05-13 2019-08-23 北京百度网讯科技有限公司 A kind of picture and text sort recommendations method and terminal device

Also Published As

Publication number Publication date
CN110548290A (en) 2019-12-10

Similar Documents

Publication Publication Date Title
KR101058702B1 (en) A mobile device receiving an electronic message comprising a text message from a sender and a method of editing the electronic message
CN110559659B (en) Game rendering optimization method, device, equipment and storage medium
CN111221597A (en) Font rendering method and device and computer readable storage medium
KR102490319B1 (en) Methods for automatic generation and transformation of artificial intelligence content
CN112995534B (en) Video generation method, device, equipment and readable storage medium
CN110548290B (en) Image-text mixed arrangement method and device, electronic equipment and storage medium
CN115423923A (en) Model rendering method and device
WO2018235326A1 (en) Computer program, font switching device, and font switching method
CN113127126B (en) Object display method and device
CN111068314B (en) NGUI resource rendering processing method and device based on Unity
CN115376033A (en) Information generation method and device
CN106020809B (en) Online game literature generates system
CN106920270A (en) Animation processing method and device
CN112907700A (en) Color filling method and device
CN112927321B (en) Intelligent image design method, device, equipment and storage medium based on neural network
CN110990104B (en) Texture rendering method and device based on Unity3D
CN113360820B (en) Page display method, system, equipment and storage medium
CN114565707A (en) 3D object rendering method and device
CN109814977B (en) Character display method and device, computing equipment and storage medium
CN109726382B (en) Typesetting method and device
CN110975284A (en) Unity-based NGUI resource rendering processing method and device
CN112755522B (en) Virtual object processing method and device
CN113112573B (en) Picture generation method and device based on markup language and electronic equipment
CN115645926A (en) Character-based game resource rapid generation method and device
CN117893419A (en) Video generation method, device, electronic equipment and readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information

Address after: 519000 Room 102, 202, 302 and 402, No. 325, Qiandao Ring Road, Tangjiawan Town, high tech Zone, Zhuhai City, Guangdong Province, Room 102 and 202, No. 327 and Room 302, No. 329

Applicant after: Zhuhai Jinshan Digital Network Technology Co.,Ltd.

Applicant after: CHENGDU XISHANJU INTERACTIVE ENTERTAINMENT TECHNOLOGY Co.,Ltd.

Address before: 519000 Room 102, 202, 302 and 402, No. 325, Qiandao Ring Road, Tangjiawan Town, high tech Zone, Zhuhai City, Guangdong Province, Room 102 and 202, No. 327 and Room 302, No. 329

Applicant before: ZHUHAI KINGSOFT ONLINE GAME TECHNOLOGY Co.,Ltd.

Applicant before: CHENGDU XISHANJU INTERACTIVE ENTERTAINMENT TECHNOLOGY Co.,Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant