CN109636880A - A kind of picture method for drafting and device, controller and medium - Google Patents

A kind of picture method for drafting and device, controller and medium Download PDF

Info

Publication number
CN109636880A
CN109636880A CN201811536640.9A CN201811536640A CN109636880A CN 109636880 A CN109636880 A CN 109636880A CN 201811536640 A CN201811536640 A CN 201811536640A CN 109636880 A CN109636880 A CN 109636880A
Authority
CN
China
Prior art keywords
picture
picture file
text
dismantling
drafting
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.)
Pending
Application number
CN201811536640.9A
Other languages
Chinese (zh)
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.)
Beijing Shangyi Heart Technology Co Ltd
Original Assignee
Beijing Shangyi Heart 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 Beijing Shangyi Heart Technology Co Ltd filed Critical Beijing Shangyi Heart Technology Co Ltd
Priority to CN201811536640.9A priority Critical patent/CN109636880A/en
Publication of CN109636880A publication Critical patent/CN109636880A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/20Drawing from basic elements, e.g. lines or circles
    • G06T11/206Drawing of charts or graphs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/60Editing figures and text; Combining figures or text

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The present invention relates to a kind of picture method for drafting and devices, controller and medium, comprising: obtains the first picture file;First picture file include constitution element and its respectively where map data mining platform;According to the constitution element of the first picture file and its respectively where map data mining platform, will first picture file dismantling for one or more pictorial elements;One or more pictorial elements of dismantling are drawn into second picture file according to respective place map data mining platform.A kind of picture method for drafting through the invention only needs the data of specified template and dynamic filling, can automatically generate final picture.

Description

A kind of picture method for drafting and device, controller and medium
Technical field
The present invention relates to Internet technical field more particularly to a kind of picture method for drafting and device, controller and medium.
Background technique
Need to allow user can be in real time according to its personal information, quickly at this for often having under product promotion demand Relevant individual pictures are drawn on ground, to promote user externally actively share, promote the secondary propagation of information.
According to active user's real-time rendering individual pictures, mean that not being available general marketing picture replaces, Zhi Nengti For graphic template, then require web page that can draw final marketing picture according to template and user information.
And existing scheme, often have the disadvantages that
(1) one is picture can not be drawn, the manual screenshotss of user are needed.That is marketing picture still uses web code construction, Then notify user can manual screenshotss save, and externally share.Such scheme user's operation is with high costs, it will extreme influence Conversion ratio.
(2) it draws picture and depends on a large amount of hand-coding, survey calculation.High, the different figure of this kind of mode development cost Piece template needs separately encoded realization.
(3) picture is drawn dependent on server end and return.The program depends on server-side, and has network transmission damage Consumption, timeliness are insufficient.
Summary of the invention
Technical problem to be solved by the present invention lies in, a kind of picture method for drafting and device, controller and medium are provided, The present invention solves the technical issues of being quickly locally generated marketing picture.
In order to solve the above-mentioned technical problem, one embodiment according to the present invention, provides a kind of picture method for drafting, wraps Include following steps:
Obtain the first picture file;First picture file include constitution element and its respectively where map data mining platform;
According to the constitution element of the first picture file and its respectively where map data mining platform, first picture file is torn open Solution is one or more pictorial elements;
One or more pictorial elements of dismantling are drawn into second picture file according to respective place map data mining platform.
Picture method for drafting above-mentioned, described image element include picture;
By first picture file dismantling for after one or more pictorial elements and described
It is gone back before one or more pictorial elements of dismantling are drawn second picture file according to respective place map data mining platform Include:
Receive picture operation requests;The picture operation requests include: pictorial information.
Picture method for drafting above-mentioned, receive picture operation requests after further include:
Preview is carried out to the picture, judges whether to handle the picture, if so, picture is handled, If it is not, directly using the picture.
Picture method for drafting above-mentioned, described image element include text class image;
By first picture file dismantling for after one or more pictorial elements and described
It is gone back before one or more pictorial elements of dismantling are drawn second picture file according to respective place map data mining platform Include:
Receive text operation request;The text operation request includes: numerical information.
Picture method for drafting above-mentioned, judges whether the text quantity in text class image reaches default style of writing number of words;
If the text quantity in the text class image reaches default style of writing number of words, by rendering algorithm to text class figure Text as in carries out slicing treatment.
Second embodiment according to the present invention provides a kind of picture drawing apparatus, comprising:
Module is obtained, for obtaining the first picture file;First picture file include constitution element and its respectively Place map data mining platform;
Disassemble module, for according to the constitution element of the first picture file and its respectively where map data mining platform, will described in The dismantling of first picture file is one or more pictorial elements;
Drafting module, for one or more pictorial elements of dismantling to be drawn the second figure according to respectively place map data mining platform Piece file.
Third embodiment according to the present invention provides a kind of controller comprising memory and processor, the storage Device is stored with computer program, and described program can be realized any one aforementioned picture of execution when being executed by the processor and draw The step of method processed or any one aforementioned picture method for drafting.
4th embodiment according to the present invention, provides a kind of computer readable storage medium, for storing computer journey Sequence, described program by a computer or processor execute any one aforementioned any one aforementioned picture method for drafting or The step of any one aforementioned picture method for drafting.
The present invention has obvious advantages and beneficial effects compared with the existing technology.By above-mentioned technical proposal, the present invention A kind of picture method for drafting and device, controller and medium can reach comparable technical progress and practicability, and have industry On extensive utility value, at least have the advantage that
A kind of picture method for drafting through the invention only needs the data of specified template and dynamic filling, can give birth to automatically At final picture.
A kind of picture method for drafting through the invention schemes the one or more of dismantling according to respective place map data mining platform Pixel element draws second picture file, is directly drawn using code, and is easier to modify.
Judge whether the text quantity in text class image reaches default style of writing number of words;If in the text class image Text quantity reaches default style of writing number of words, carries out slicing treatment to the text in text class image by rendering algorithm.It uses Rendering algorithm solves the problems, such as the line feed that fractures of word in text, while controlling the accuracy of slice.
Present invention mainly solves in the case where the customized marketing picture of user generates propagation demand, a large amount of picture generates and exploitation Efficiency, and the optimization processing under preferable different scenes is provided.
The above description is only an overview of the technical scheme of the present invention, in order to better understand the technical means of the present invention, And it can be implemented in accordance with the contents of the specification, and in order to allow above and other objects, features and advantages of the invention can It is clearer and more comprehensible, it is special below to lift preferred embodiment, and cooperate attached drawing, detailed description are as follows.
Detailed description of the invention
Fig. 1 provides picture method for drafting schematic diagram for one embodiment of the invention;
Fig. 2 provides picture drawing apparatus schematic diagram for one embodiment of the invention;
Description of symbols:
1: obtaining module 2: dismantling module
3: drafting module
Specific embodiment
It is of the invention to reach the technical means and efficacy that predetermined goal of the invention is taken further to illustrate, below in conjunction with Attached drawing and preferred embodiment, to the specific of a kind of picture method for drafting proposed according to the present invention and device, controller and medium Embodiment and its effect, detailed description is as follows.
It should be noted that a picture, the information and content for being included according to it can divide, i.e., according to figure layer One complete picture is composed of by way of map overlay several pictorial elements.In practical business, due to Picture needs to draw using code, further further can also individually disassemble the image of text class as text category information (this Part can directly be drawn using code, and be easier to modify).
Fig. 1 provides picture method for drafting schematic diagram for one embodiment of the invention, comprising the following steps:
S101, the first picture file is obtained;First picture file include constitution element and its respectively where figure layer Information.
S102, according to the constitution element of the first picture file and its respectively where map data mining platform, by first picture File dismantling is one or more pictorial elements.Map data mining platform specifically is described using array, figure layer is suitable in array more on the lower Sequence is then more forward.Each image information saves as a data object in array.
S103, one or more pictorial elements of dismantling are drawn by second picture file according to respectively place map data mining platform. After obtaining the configuration information of picture, needs to go to realize according to configuration information using code, drawn and revert to canvas element In, to obtain final image data.According to array sequence in configuration information, successively draw.It is successively complete according to sequence in array After drafting, final image data can be obtained on canvas.The relevant interface of canvas offer is provided, it will Image information in canvas is converted to real picture file.
A kind of picture method for drafting through the invention only needs the data of specified template and dynamic filling, can give birth to automatically At final picture.
Described image element includes picture and text class image, is saved using type field: type=text | image.
As an example, described image element includes picture;It is one or more by first picture file dismantling After pictorial element and the basis respectively where map data mining platform by one or more pictorial elements drafting second of dismantling Before picture file further include: receive picture operation requests;The picture operation requests include: pictorial information.Such as image exists Whether location information, size information in whole picture cut, and are converted to the pictorial information of field expression.
When type is image, the drawimage method of canvas is called, is drawn according to the configuration information of image Into canvas.
As an example, after receiving picture operation requests further include: carry out preview to the picture, judge whether pair The picture is handled, if so, handling picture, if it is not, directly using the picture.
As an example, described image element includes text class image;It is one by first picture file dismantling Or respectively place map data mining platform draws one or more pictorial elements of dismantling after multiple images element and in the basis Before second picture file processed further include: receive text operation request;The text operation request includes: numerical information.Such as Numerical information include text class image according to its text size, font, thickness, position, to its mode etc., be also converted to corresponding word Section.
As an example, if a line can complete, the drawing ap i for calling directly canvas is drawn.
As an example, judge whether the text quantity in text class image reaches default style of writing number of words;If described Text quantity in text class image reaches default style of writing number of words, is carried out by rendering algorithm to the text in text class image Slicing treatment.The line feed that fractures of word in text is solved the problems, such as using rendering algorithm, while controlling the accuracy of slice.Multirow Text draw when, need according in configuration initial position message and a line text shared by elevation information, come adjust automatically Drafting position after whole line feed.These, which need to be realized by rendering algorithm, supports.
Fig. 2 provides picture drawing apparatus schematic diagram for one embodiment of the invention, comprising:
Module 1 is obtained, for obtaining the first picture file;First picture file include constitution element and its respectively Place map data mining platform;
Disassemble module 2, for according to the constitution element of the first picture file and its respectively where map data mining platform, will described in The dismantling of first picture file is one or more pictorial elements;
Drafting module 3, for one or more pictorial elements of dismantling to be drawn second according to respectively place map data mining platform Picture file.
The embodiment of the invention also provides a kind of controllers comprising memory and processor, it is characterised in that: described to deposit Reservoir is stored with computer program, and described program can be realized when being executed by the processor executes any one aforementioned picture The step of method for drafting or any one aforementioned picture method for drafting.
The embodiment of the invention also provides a kind of computer readable storage mediums, for storing computer program, feature Be: described program is executing any one aforementioned any one aforementioned picture method for drafting by a computer or processor Or the step of aforementioned any one picture method for drafting.
The embodiment of the present invention by the refinement to a large amount of scenes, to the picture dynamic data that can be used under most of scenes into Row is summarized, and the local picture for targetedly developing complete set generates library, it is only necessary to the data of specified template and dynamic filling (picture, text etc.), can automatically generate final picture.And different scenes is directed to, such as wechat, own app etc., has made needle Optimization to property:
(1) wechat can prompt user that downloading is gone to save sharing after generating picture
(2) it has by oneself in App, external picture can actively can have been adjusted after generating by the communication protocol with app, picture Sharing function realizes that a better key is propagated.
The above described is only a preferred embodiment of the present invention, be not intended to limit the present invention in any form, though So the present invention has been disclosed as a preferred embodiment, and however, it is not intended to limit the invention, any technology people for being familiar with this profession Member, without departing from the scope of the present invention, when the technology contents using the disclosure above make a little change or modification For the equivalent embodiment of equivalent variations, but anything that does not depart from the technical scheme of the invention content, according to the technical essence of the invention Any simple modification, equivalent change and modification to the above embodiments, all of which are still within the scope of the technical scheme of the invention.

Claims (8)

1. a kind of picture method for drafting characterized by comprising
Obtain the first picture file;First picture file include constitution element and its respectively where map data mining platform;
According to the constitution element of the first picture file and its respectively where map data mining platform, by first picture file dismantling be One or more pictorial elements;
One or more pictorial elements of dismantling are drawn into second picture file according to respective place map data mining platform.
2. picture method for drafting according to claim 1, which is characterized in that described image element includes picture;
By first picture file dismantling for after one or more pictorial elements and in the respective place figure layer of the basis Information draws one or more pictorial elements of dismantling before second picture file further include:
Receive picture operation requests;The picture operation requests include: pictorial information.
3. picture method for drafting according to claim 2, which is characterized in that also wrapped after the reception picture operation requests It includes:
Preview is carried out to the picture, judges whether to handle the picture, if so, picture is handled, if it is not, Directly use the picture.
4. picture method for drafting according to claim 1, which is characterized in that described image element includes text class image;
By first picture file dismantling for after one or more pictorial elements and in the respective place figure layer of the basis Information draws one or more pictorial elements of dismantling before second picture file further include: receives text operation request;Institute Stating text operation request includes: numerical information.
5. picture method for drafting according to claim 1, which is characterized in that further include:
Judge whether the text quantity in text class image reaches default style of writing number of words;
If the text quantity in the text class image reaches default style of writing number of words, by rendering algorithm in text class image Text carry out slicing treatment.
6. a kind of picture drawing apparatus characterized by comprising
Module is obtained, for obtaining the first picture file;First picture file include constitution element and its respectively where Map data mining platform;
Disassemble module, for according to the constitution element of the first picture file and its respectively place map data mining platform, by described first Picture file dismantling is one or more pictorial elements;
Drafting module, for one or more pictorial elements of dismantling to be drawn second picture text according to respectively place map data mining platform Part.
7. a kind of controller comprising memory and processor, it is characterised in that: the memory is stored with computer program, Described program can be realized method described in any one of claim 1 to 5 claim when being executed by the processor The step of.
8. a kind of computer readable storage medium, for storing computer program, it is characterised in that: described program is calculated by one The step of machine or processor realize the method as described in any one of claim 1 to 5 claim when executing.
CN201811536640.9A 2018-12-14 2018-12-14 A kind of picture method for drafting and device, controller and medium Pending CN109636880A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811536640.9A CN109636880A (en) 2018-12-14 2018-12-14 A kind of picture method for drafting and device, controller and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811536640.9A CN109636880A (en) 2018-12-14 2018-12-14 A kind of picture method for drafting and device, controller and medium

Publications (1)

Publication Number Publication Date
CN109636880A true CN109636880A (en) 2019-04-16

Family

ID=66074234

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811536640.9A Pending CN109636880A (en) 2018-12-14 2018-12-14 A kind of picture method for drafting and device, controller and medium

Country Status (1)

Country Link
CN (1) CN109636880A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113706662A (en) * 2021-07-15 2021-11-26 中科大数据研究院 Electronic poster generation method, device and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104620572A (en) * 2012-09-19 2015-05-13 富士胶片株式会社 Imaging device and method for controlling same
CN105550980A (en) * 2014-10-29 2016-05-04 阿里巴巴集团控股有限公司 Image generation method and related apparatus
CN108399155A (en) * 2018-01-17 2018-08-14 链家网(北京)科技有限公司 A kind of Picture Generation Method and mobile terminal
CN108509239A (en) * 2018-03-07 2018-09-07 斑马网络技术有限公司 Figure layer display methods, device, electronic equipment and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104620572A (en) * 2012-09-19 2015-05-13 富士胶片株式会社 Imaging device and method for controlling same
CN105550980A (en) * 2014-10-29 2016-05-04 阿里巴巴集团控股有限公司 Image generation method and related apparatus
CN108399155A (en) * 2018-01-17 2018-08-14 链家网(北京)科技有限公司 A kind of Picture Generation Method and mobile terminal
CN108509239A (en) * 2018-03-07 2018-09-07 斑马网络技术有限公司 Figure layer display methods, device, electronic equipment and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113706662A (en) * 2021-07-15 2021-11-26 中科大数据研究院 Electronic poster generation method, device and storage medium

Similar Documents

Publication Publication Date Title
US20200218709A1 (en) Update Basis for Updating Digital Content in a Digital Medium Environment
CN106056529B (en) Method and equipment for training convolutional neural network for picture recognition
US8209598B1 (en) Exporting electronic documents from rich internet applications
JP4913777B2 (en) Web page distribution system
CN107239318A (en) Using conversion method, device and equipment
US9330077B2 (en) Dynamic image generation for customizable user interfaces
CN102684986B (en) Method and system for displaying pictures at terminal
CN104318349B (en) Extra large nationality monitoring management method based on Silverlight and ArcGIS
US10838608B2 (en) Smooth scrolling of a structured document presented in a graphical user interface with bounded memory consumption
US20140047329A1 (en) Network Based Font Subset Management
WO2016066147A2 (en) Method and device for processing image
US9396564B2 (en) Atlas generation based on client video configuration
US9449407B2 (en) Displaying dynamic content on a map based on user's location and scheduled task
CN104572084B (en) User interface generation and data distributing method, device in card business
JP2018508059A (en) Network-based static font subset management
AU2015298291B2 (en) Optimized rendering of shared documents on client devices with document raster representations
CN109697055B (en) Method and system for generating mobile App page
CN101123607B (en) Dynamically refreshing method and device for image information in webpage
US20190265853A1 (en) Iterating Between a Graphical User Interface and Plain-Text Code for Data Visualization
CN109636880A (en) A kind of picture method for drafting and device, controller and medium
US20150212981A1 (en) Providing print view of document for editing in web-based application
US9336319B2 (en) Data file and rule driven synchronous or asynchronous document generation
CN112486482A (en) Page display method and device
CN104769559A (en) Fast, dynamic cache packing
US11244101B2 (en) Declarative interface for interaction design

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20190416