CN112199924A - Method and device for outputting text as picture - Google Patents
Method and device for outputting text as picture Download PDFInfo
- Publication number
- CN112199924A CN112199924A CN201910532654.1A CN201910532654A CN112199924A CN 112199924 A CN112199924 A CN 112199924A CN 201910532654 A CN201910532654 A CN 201910532654A CN 112199924 A CN112199924 A CN 112199924A
- Authority
- CN
- China
- Prior art keywords
- text
- picture
- user
- length
- preset
- 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.)
- Withdrawn
Links
- 238000000034 method Methods 0.000 title claims abstract description 23
- 239000003086 colorant Substances 0.000 claims description 3
- 238000012790 confirmation Methods 0.000 claims description 3
- 238000000605 extraction Methods 0.000 claims description 3
- 230000001427 coherent effect Effects 0.000 abstract description 2
- 238000010586 diagram Methods 0.000 description 6
- 230000000694 effects Effects 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000009191 jumping Effects 0.000 description 1
Images
Landscapes
- Processing Or Creating Images (AREA)
- User Interface Of Digital Computer (AREA)
Abstract
The application provides a method and a device for outputting a text as a picture, wherein the method comprises the following steps: extracting a text selected by a user; determining image-text distribution according to the length of the text; and generating a picture file according to the selection of the user. The method can output the text in the selected document as the picture, can also adjust the size of the selected area to control the content of the output picture, is convenient for a user to dynamically adjust the selected text output as the picture, realizes that the text output is the picture operation in one step by utilizing the method provided by the invention, and has coherent operation experience and high flexibility.
Description
Technical Field
The invention relates to the field of document operation, in particular to a method and a device for outputting a text as a picture.
Background
In the prior art, when a document is output as a picture, the whole document can only be output as the picture, if only some of the document is written into a very exquisite sentence, the segment of the heart chord is touched to be output as the picture, at the moment, only the segment of text can be copied, then a blank document is newly built, then the segment of text is pasted into the newly-built blank document, and then the whole new document is output as the picture. In the prior art, the whole document is taken as the minimum output unit, and the operation steps are complicated.
Disclosure of Invention
The application provides a method and a device for outputting a text as a picture, which are used for outputting a selected text as a picture.
The technical scheme is as follows:
the invention provides a method for outputting a text as a picture, which comprises the following steps:
extracting a text selected by a user;
determining image-text distribution according to the length of the text;
and generating a picture file according to the selection of the user.
Preferably, determining the teletext distribution according to the length of the text comprises:
judging whether the length of the selected text is larger than the preset number of characters;
when the length of the selected text is less than or equal to the preset number of characters, determining image-text distribution according to the length of the text and a preset layout format;
and when the length of the selected text is larger than the preset number of characters, prompting the user to reselect the text.
Preferably, determining the image-text distribution according to the length of the text and the preset layout format includes:
and drawing the layout picture of the selected text according to a preset format, a preset illustration picture, a preset text font, a preset text color and a preset layout style corresponding to the length of the text to generate the image-text distribution preview.
Preferably, the generating of the picture file according to the selection of the user includes:
and generating a picture file according to the switching operation or the confirmation operation of the layout style of the user.
Preferably, the layout style switching operation of the user includes one or more of:
the operation of changing illustration pictures, the operation of changing layout, the operation of changing text fonts, the operation of changing text colors and the operation of changing layout styles.
Preferably, the generating of the picture file according to the selection of the user includes:
and receiving the text modified by the user, and determining the image-text distribution of the modified text.
Preferably, the method further comprises: and saving and/or sharing the picture file.
The invention also provides a device for outputting the text as the picture, which comprises the following components:
the extraction module is used for extracting the text selected by the user;
the preview module is set to determine the image-text distribution according to the length of the text;
and the generating module is used for generating the picture file according to the selection of the user.
Preferably, the device further comprises: and the updating module is set to receive the text modified by the user and determine the image-text distribution of the modified text.
Preferably, the device further comprises: and the sharing module is used for saving and/or sharing the picture file.
Compared with the prior art, the application has the following beneficial effects:
compared with the prior art, the method can output the text in the selected document as the picture, can also adjust the size of the selected area to control the content of the output picture, is convenient for a user to dynamically adjust the selected text output as the picture, realizes that the text output is operated as the picture in one step by utilizing the method provided by the invention, and has coherent operation experience and high flexibility.
Drawings
FIG. 1 is a flowchart of a method for outputting a text as a picture according to an embodiment of the present invention;
FIG. 2 is a schematic structural diagram of an apparatus for outputting text as a picture according to an embodiment of the present invention;
FIG. 3 is a schematic structural diagram of an apparatus for outputting text as a picture according to an embodiment of the present invention;
FIG. 4 is a schematic structural diagram of an apparatus for outputting text as a picture according to an embodiment of the present invention;
FIG. 5 is a flowchart of outputting a text as a picture according to an embodiment of the present invention;
FIG. 6 is a diagram illustrating the calculation of the number of characters in a selected text according to an embodiment of the present invention;
FIG. 7 is a preview of a text output in accordance with an embodiment of the present invention;
fig. 8 is a schematic diagram of generating a picture according to an embodiment of the present invention.
Detailed Description
The technical solutions of the present application will be described in more detail below with reference to the accompanying drawings and embodiments.
It should be noted that, if not conflicted, the embodiments and the features of the embodiments can be combined with each other and are within the scope of protection of the present application. Additionally, while a logical order is shown in the flow diagrams, in some cases, the steps shown or described may be performed in an order different than here.
As shown in fig. 1, an embodiment of the present invention provides a method for outputting a text as a picture, including:
s101, extracting a text selected by a user;
s102, determining image-text distribution according to the length of the text;
and S103, generating a picture file according to the selection of the user.
In the embodiment of the present invention, the step S102 of determining the image-text distribution according to the length of the text includes:
judging whether the length of the selected text is larger than the preset number of characters;
when the length of the selected text is less than or equal to the preset number of characters, determining image-text distribution according to the length of the text and a preset layout format;
and when the length of the selected text is larger than the preset number of characters, prompting the user to reselect the text.
In the embodiment of the present invention, determining the image-text distribution according to the length of the text and the preset layout format includes:
and drawing the layout picture of the selected text according to a preset format, a preset illustration picture, a preset text font, a preset text color and a preset layout style corresponding to the length of the text to generate the image-text distribution preview.
In the embodiment of the present invention, the step S103 of generating the picture file according to the selection of the user includes:
and generating a picture file according to the switching operation or the confirmation operation of the layout style of the user.
In this embodiment of the present invention, the layout style switching operation of the user includes one or more of the following:
the operation of changing illustration pictures, the operation of changing layout, the operation of changing text fonts, the operation of changing text colors and the operation of changing layout styles.
In the embodiment of the present invention, the step S103 of generating the picture file according to the selection of the user includes:
and receiving the text modified by the user, and determining the image-text distribution of the modified text.
The method of the embodiment of the invention further comprises the following steps: and saving and/or sharing the picture file.
The embodiment of the invention outputs the document as the picture, the operation is accurate to each character of the selection area, the content to be output as the picture is dynamically controlled in real time by adjusting the size of the selection area, and the document text content is extracted in a finer dimension and is output as the picture. High flexibility, convenience and rapidness. When making and previewing a picture interface, a user can select a section of characters in a document, and then a selected photo is matched to generate a picture.
As shown in fig. 2, an embodiment of the present invention provides an apparatus for outputting a text as a picture, including:
an extraction module 100 configured to extract a text selected by a user;
the preview module 200 is configured to determine the image-text distribution according to the length of the text;
the generating module 300 is configured to generate a picture file according to a selection of a user.
As shown in fig. 3, in the embodiment of the present invention, the apparatus further includes: the update module 400 is configured to accept a text modified by a user and determine a distribution of graphics and text of the modified text.
As shown in fig. 4, in the embodiment of the present invention, the apparatus further includes: the sharing module 500 is configured to save and/or share the picture file.
Example one
As shown in fig. 5, this embodiment describes a process of outputting a selected text as a picture:
1) opening a document, selecting a section of text, not limiting the selection area, and only extracting the selected text;
2) determining a selection area, popping up a menu option, adding one item to the menu option, and outputting the menu option as a picture (shown in figure 6);
3) clicking output as a picture option, judging the length of the selected Chinese text according to the size of the characters, defining a maximum selectable character number (for example 3000 characters) as the length for controlling the output picture, judging that the length of the selected Chinese text is less than or equal to 3000 characters, executing the step (4), otherwise prompting that the selected text is too long, and please plan the selection area again;
4) extracting the selected text content, and jumping to an interface for previewing and making pictures (as shown in fig. 7 and 8, description: the pictures are for convenience of description only, actual implementation does not require such UI effects
a. The main interface is picture drawing preview, and default layout format pictures (default format, default illustration pictures, default text font color, default layout style and the like) are drawn in a default state;
b. different layout styles are switched, the switching can be realized through a thumbnail list, a user clicks the thumbnail to trigger the text and the picture typesetting rule corresponding to the thumbnail to draw, and the drawing is completed and displayed in a preview image; (user selectable)
c. Supporting to change the illustration picture, and supporting to call a system camera to take a picture or select a system album picture as the illustration picture; (user selectable)
d. Supporting to change text content and font color; (user selectable)
e. B, c and d, triggering a preview drawing instruction after each step is finished;
f. and c, a sharing button is arranged at the bottom of the interface, and the functions of the steps b, c and d are switched, and the sharing button is clicked to pop up a sharing panel, so that the sharing to the social platform is supported, and the sharing to the local album can be also stored.
5) Generating a picture file according to the preview effect;
6) sharing is performed or saved to the album.
Although the embodiments of the present invention have been described above, the contents thereof are merely embodiments adopted to facilitate understanding of the technical aspects of the present invention, and are not intended to limit the present invention. It will be apparent to persons skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the invention as defined in the appended claims.
Claims (10)
1. A method for outputting text as pictures, comprising:
extracting a text selected by a user;
determining image-text distribution according to the length of the text;
and generating a picture file according to the selection of the user.
2. The method of claim 1, wherein: determining the teletext distribution according to the length of the text comprises:
judging whether the length of the selected text is larger than the preset number of characters;
when the length of the selected text is less than or equal to the preset number of characters, determining image-text distribution according to the length of the text and a preset layout format;
and when the length of the selected text is larger than the preset number of characters, prompting the user to reselect the text.
3. The method of claim 2, wherein: determining the image-text distribution according to the length of the text and the preset layout format comprises:
and drawing the layout picture of the selected text according to a preset format, a preset illustration picture, a preset text font, a preset text color and a preset layout style corresponding to the length of the text to generate the image-text distribution preview.
4. The method of claim 2, wherein: generating the picture file according to the selection of the user includes:
and generating a picture file according to the switching operation or the confirmation operation of the layout style of the user.
5. The method of claim 4, wherein: the layout style switching operation of the user includes one or more of:
the operation of changing illustration pictures, the operation of changing layout, the operation of changing text fonts, the operation of changing text colors and the operation of changing layout styles.
6. The method of claim 1, wherein: generating the picture file according to the selection of the user includes:
and receiving the text modified by the user, and determining the image-text distribution of the modified text.
7. The method of claim 1, wherein: further comprising: and saving and/or sharing the picture file.
8. An apparatus for outputting text as a picture, comprising:
the extraction module is used for extracting the text selected by the user;
the preview module is set to determine the image-text distribution according to the length of the text;
and the generating module is used for generating the picture file according to the selection of the user.
9. The apparatus of claim 8, wherein: further comprising: and the updating module is set to receive the text modified by the user and determine the image-text distribution of the modified text.
10. The apparatus of claim 8, wherein: further comprising: and the sharing module is used for saving and/or sharing the picture file.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910532654.1A CN112199924A (en) | 2019-06-19 | 2019-06-19 | Method and device for outputting text as picture |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910532654.1A CN112199924A (en) | 2019-06-19 | 2019-06-19 | Method and device for outputting text as picture |
Publications (1)
Publication Number | Publication Date |
---|---|
CN112199924A true CN112199924A (en) | 2021-01-08 |
Family
ID=74004310
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910532654.1A Withdrawn CN112199924A (en) | 2019-06-19 | 2019-06-19 | Method and device for outputting text as picture |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112199924A (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6154757A (en) * | 1997-01-29 | 2000-11-28 | Krause; Philip R. | Electronic text reading environment enhancement method and apparatus |
US20070201115A1 (en) * | 2006-02-28 | 2007-08-30 | Brother Kogyo Kabushiki Kaisha | Data Generating Apparatus, and Print Apparatus |
CN103176969A (en) * | 2011-12-20 | 2013-06-26 | 腾讯科技(深圳)有限公司 | Method and device for sharing microblogging information |
CN104123383A (en) * | 2014-08-04 | 2014-10-29 | 网易(杭州)网络有限公司 | Method and device used in media application |
CN107517323A (en) * | 2017-09-08 | 2017-12-26 | 咪咕数字传媒有限公司 | A kind of information sharing method, device and storage medium |
-
2019
- 2019-06-19 CN CN201910532654.1A patent/CN112199924A/en not_active Withdrawn
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6154757A (en) * | 1997-01-29 | 2000-11-28 | Krause; Philip R. | Electronic text reading environment enhancement method and apparatus |
US20070201115A1 (en) * | 2006-02-28 | 2007-08-30 | Brother Kogyo Kabushiki Kaisha | Data Generating Apparatus, and Print Apparatus |
CN103176969A (en) * | 2011-12-20 | 2013-06-26 | 腾讯科技(深圳)有限公司 | Method and device for sharing microblogging information |
CN104123383A (en) * | 2014-08-04 | 2014-10-29 | 网易(杭州)网络有限公司 | Method and device used in media application |
CN107517323A (en) * | 2017-09-08 | 2017-12-26 | 咪咕数字传媒有限公司 | A kind of information sharing method, device and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11281465B2 (en) | Non-transitory computer readable recording medium, computer control method and computer device for facilitating multilingualization without changing existing program data | |
US8576233B2 (en) | Program generation device, program generation method, and computer-readable storage medium | |
US20190012301A1 (en) | Information processing apparatus, information processing method, and information processing program | |
CN110109590B (en) | Automatic reading method and device | |
WO2023155811A1 (en) | Page layout adjustment method and apparatus | |
CN113282424A (en) | Information reference method and device and electronic equipment | |
CN113093960A (en) | Image editing method, editing device, electronic device and readable storage medium | |
WO2023045922A1 (en) | Information input method and apparatus | |
WO2023093809A1 (en) | File editing processing method and apparatus, and electronic device | |
CN112163432A (en) | Translation method, translation device and electronic equipment | |
CN111934985A (en) | Media content sharing method, device and equipment and computer readable storage medium | |
CN112199924A (en) | Method and device for outputting text as picture | |
CN111724455A (en) | Image processing method and electronic device | |
WO2023284640A1 (en) | Picture processing method and electronic device | |
CN113362426B (en) | Image editing method and image editing device | |
JP2010134801A (en) | Content creating apparatus and content browsing apparatus | |
JP6517445B2 (en) | INFORMATION PROCESSING APPARATUS, INFORMATION PROCESSING METHOD, PROGRAM, AND STORAGE MEDIUM | |
CN115454365A (en) | Picture processing method and device, electronic equipment and medium | |
KR101779380B1 (en) | System and method for providing vector and bitmap overlay font | |
CN111984113B (en) | Text editing method and device and electronic equipment | |
JP2019133605A (en) | Information processing apparatus and information processing program | |
KR102149099B1 (en) | Apparatus and method of inputting characters | |
CN113269583A (en) | Content production method and device and electronic equipment | |
CN111639474A (en) | Document style reconstruction method and device and electronic equipment | |
CN108459786B (en) | Method and device for displaying customized LOGO and client equipment |
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 | ||
WW01 | Invention patent application withdrawn after publication | ||
WW01 | Invention patent application withdrawn after publication |
Application publication date: 20210108 |