CN111597010A - Method and device for generating pictures of Web pages, printing equipment and recording medium - Google Patents
Method and device for generating pictures of Web pages, printing equipment and recording medium Download PDFInfo
- Publication number
- CN111597010A CN111597010A CN202010463632.7A CN202010463632A CN111597010A CN 111597010 A CN111597010 A CN 111597010A CN 202010463632 A CN202010463632 A CN 202010463632A CN 111597010 A CN111597010 A CN 111597010A
- Authority
- CN
- China
- Prior art keywords
- page
- picture
- code
- web page
- generating
- 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
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/451—Execution arrangements for user interfaces
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/048—Interaction techniques based on graphical user interfaces [GUI]
- G06F3/0484—Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
- G06F3/04845—Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range for image manipulation, e.g. dragging, rotation, expansion or change of colour
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/048—Interaction techniques based on graphical user interfaces [GUI]
- G06F3/0487—Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser
- G06F3/0488—Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/12—Digital output to print unit, e.g. line printer, chain printer
- G06F3/1201—Dedicated interfaces to print systems
- G06F3/1202—Dedicated interfaces to print systems specifically adapted to achieve a particular effect
- G06F3/1203—Improving or facilitating administration, e.g. print management
- G06F3/1205—Improving or facilitating administration, e.g. print management resulting in increased flexibility in print job configuration, e.g. job settings, print requirements, job tickets
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T11/00—2D [Two Dimensional] image generation
- G06T11/60—Editing figures and text; Combining figures or text
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2203/00—Indexing scheme relating to G06F3/00 - G06F3/048
- G06F2203/048—Indexing scheme relating to G06F3/048
- G06F2203/04806—Zoom, i.e. interaction techniques or interactors for controlling the zooming operation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2203/00—Indexing scheme relating to G06F3/00 - G06F3/048
- G06F2203/048—Indexing scheme relating to G06F3/048
- G06F2203/04808—Several contacts: gestures triggering a specific function, e.g. scrolling, zooming, right-click, when the user establishes several contacts with the surface simultaneously; e.g. using several fingers or a combination of fingers and pen
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Human Computer Interaction (AREA)
- Software Systems (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The invention belongs to the technical field of internet, and provides a picture generation method and device based on a Web page, printing equipment and a recording medium. The method is applied to a terminal, and pictures are generated according to the operation of a user on the terminal, and the method comprises the following steps: receiving user operation; generating a Web page code according to user operation, and analyzing the Web page code to generate a Web page; and converting the Web page into a picture. According to the invention, functions of drawing, editing, moving (dragging and pulling), rotating, zooming and the like of the page module are realized by combining the Web page technology and the functions of the App, the consistency of the App end and the front end of the page is ensured, the working efficiency of developers is improved, the flash back rate is reduced, the picture generation method is optimized, and the healthy operation of the App is ensured.
Description
Technical Field
The invention belongs to the technical field of internet, is particularly suitable for the technical field of picture processing, and more particularly relates to a picture generation method and device based on a Web page, printing equipment and a recording medium.
Background
The front end is a foreground part of the website and runs on browsers such as a PC (personal computer) end and a mobile end to display webpages browsed by a user. Due to the application of front-end frames of HTML5 and CSS3, the cross-platform response type webpage design can adapt to various screen resolutions, perfect dynamic effect design is achieved, and extremely high user experience is brought to a user.
The front-end technology is generally divided into front-end design and front-end development, the front-end design can be generally understood as visual design of a website, and the front-end development is the foreground code implementation of the website and comprises basic HTML and CSS and JavaScript/ajax, the highest advanced versions HTML5, CSS3 and SVG and the like.
However, as HTML grows, many display functions are added to HTML to meet the demands of page designers. With the increase of these functions, HTML becomes more and more cluttered, and HTML pages are also more and more bloated. In the prior art, a Cascading Style Sheet (CSS), as a computer markup language, is responsible for the representation of web page contents in standard web page design, and the CSS can precisely control the position layout of each display object in a web page, and support almost all fonts, word sizes, and styles. In addition, at present, HTML is generally adopted to be edited by combining with CSS codes when a webpage is designed, and the efficiency of webpage design is effectively improved.
In the prior art, the native App typically implements picture processing functions (click to view, zoom, save, slide view, etc.). Further, the existing App functions also include text editing, paper strip text, table editing, picture editing, stickers, theme editing, plug-ins (including time plug-ins, two-dimensional code bar code plug-ins, voice input plug-ins), and graffiti editing. However, each small control is drawn by android and ios developers little by using a canvas technology, the implementation speed is very low, the cost is high, and the problems that the App memory is unstable and the App crashes are caused by operations of moving (dragging and pulling), zooming in and out, editing text, changing text and the like of a large number of fingers are solved. In addition, there are no double-click events and the like in the App function at present.
Disclosure of Invention
Technical problem to be solved
The method aims to solve the problems of slow speed, inconsistency, high cost, high flash back rate (Crush rate) and the like of android and Ios native drawing, editing, moving (dragging and pulling) and rotary zooming, shorten the development period, avoid online accidents (especially App crash accidents), improve the working efficiency and further optimize the picture generation method.
(II) technical scheme
In order to solve the technical problem, an aspect of the present invention provides a method for generating a picture based on a Web page, which is applied to a terminal and generates a picture according to an operation of a user on the terminal, and the method includes the following steps: receiving user operation; generating a Web page code according to user operation, and analyzing the Web page code to generate a Web page; and converting the Web page into a picture.
Optionally, according to a preferred embodiment of the present invention, the Web page is composed of page elements, the Web page code is composed of codes of the page elements, and the generating the Web page code according to the user operation includes: and respectively generating page elements forming the Web page and codes of the page elements according to user operation.
Optionally, the method further comprises: and receiving the operation of the user on the page element, changing the parameter in the code of the page element according to the operation on the page element, and redrawing the page element on the web page.
Optionally, the operation on the page element comprises at least one of: move, zoom, rotate, flip.
Optionally, the operation on the page element is rotation, and the parameter in the code of the page element includes an arrangement angle; the changing parameters in the code of the page element according to the operation on the page element comprises: recording an initial angle formed by the two rotating contacts and a current angle formed by the two rotating contacts in movement, calculating a rotating direction and a rotating angle based on a difference between the initial angle and the current angle, and calculating the arrangement angle according to the rotating direction and the rotating angle.
Optionally, the operation on the page element is zooming, and the parameter in the code of the page element includes a zooming parameter; the changing parameters in the code of the page element according to the operation on the page element comprises: recording an initial distance formed by two moving contacts and a current distance formed by two moving contacts in movement, and determining a scaling parameter by dividing the current distance by the initial distance.
Optionally, the generating, according to the user operation, the page elements constituting the Web page and the code of the page element respectively includes: and generating the code of the page element by the page element code module according to the user operation.
Optionally, the page element code module comprises at least one of: text template, picture module, picture and text template, background template.
Optionally, the page elements include pictures, and the generating the page elements constituting the Web page and the codes of the page elements according to the user operation respectively includes: and generating a picture according to the user operation, storing the picture and generating a Web page code of the picture.
The invention provides a picture generating device based on a Web page in a second aspect, which comprises the following modules: the input module is used for receiving user operation; the page generation module is used for generating a Web page code according to user operation and analyzing the Web page code to generate a Web page; and the conversion module is used for converting the Web page into a picture.
The third aspect of the present invention provides a printing apparatus for generating a picture and printing the picture according to an operation of a user on a terminal, comprising picture generating means for generating a picture according to the operation of the user and sending the generated picture to a printing means, and the printing means for printing the picture, wherein the picture generating means is capable of executing the picture generating method of the present invention.
A fourth aspect of the present invention provides a computer-readable medium storing a computer-executable program, which when executed, implements the picture generation method according to the present invention.
(III) advantageous effects
Compared with the prior art, the invention can rapidly realize the functions of moving (dragging and pulling), rotating, overturning, zooming and the like of the page block-level operation area through the Web Html tag in a block structure, also simulates a double-click event to realize terminal double-click operation, does not need developers to draw a little by using a canvas technology, and reduces the development cost; the advantages of the Web webpage technology and the App are complementary, so that the functions of drawing, editing, moving (dragging and pulling), rotating, turning, zooming and the like of the page module are realized, the consistency of the App end and the front end of the webpage is ensured, the working efficiency of developers is improved, the flash back rate is reduced, the picture generation method is optimized, and the healthy operation of the App is ensured.
Drawings
FIG. 1 is a flow chart of an example of a picture generation method of the present invention;
FIG. 2 is a block diagram of an example of an application scenario of the picture generation method of the present invention;
FIG. 3 is a schematic block diagram of data interaction between an App end and a Web end of the picture generation method of the present invention;
FIG. 4 is a schematic diagram of a terminal double-click event according to the picture generation method of the present invention;
FIG. 5 is a flow chart of another example of a picture generation method of the present invention;
FIG. 6 is a schematic block diagram of an example of a picture generation apparatus of the present invention;
FIG. 7 is a schematic block diagram of another example of a picture generation apparatus of the present invention;
FIG. 8 is a schematic structural diagram of an electronic device of one embodiment of the invention;
fig. 9 is a schematic diagram of a computer-readable recording medium of an embodiment of the present invention.
Detailed Description
In describing particular embodiments, specific details of structures, properties, effects, or other features are set forth in order to provide a thorough understanding of the embodiments by one skilled in the art. However, it is not excluded that a person skilled in the art may implement the invention in a specific case without the above-described structures, performances, effects or other features.
The flow chart in the drawings is only an exemplary flow demonstration, and does not represent that all the contents, operations and steps in the flow chart are necessarily included in the scheme of the invention, nor does it represent that the execution is necessarily performed in the order shown in the drawings. For example, some operations/steps in the flowcharts may be divided, some operations/steps may be combined or partially combined, and the like, and the execution order shown in the flowcharts may be changed according to actual situations without departing from the gist of the present invention.
The block diagrams in the figures generally represent functional entities and do not necessarily correspond to physically separate entities. I.e. these functional entities may be implemented in the form of software, or in one or more hardware modules or integrated circuits, or in different network and/or processing unit devices and/or microcontroller devices.
The same reference numerals denote the same or similar elements, components, or parts throughout the drawings, and thus, a repetitive description thereof may be omitted hereinafter. It will be further understood that, although the terms first, second, third, etc. may be used herein to describe various elements, components, or sections, these elements, components, or sections should not be limited by these terms. That is, these phrases are used only to distinguish one from another. For example, a first device may also be referred to as a second device without departing from the spirit of the present invention. Furthermore, the term "and/or", "and/or" is intended to include all combinations of any one or more of the listed items.
In order to solve the technical problem, the invention provides a picture generation method based on a Web page, which is applied to a terminal and generates a picture according to the operation of a user on the terminal, and the method comprises the following steps: receiving user operation; generating a Web page code according to user operation, and analyzing the Web page code to generate a Web page; and converting the Web page into a picture.
In the invention, parameters in a page code are changed by using a CSS box model at the front end of a Web page, specifically, functions of moving (dragging and pulling), rotating, turning, zooming and the like of a page block-level operation area can be quickly realized by using a Web Html tag with a block structure, functions of editing, moving (dragging and pulling), rotating, turning, zooming and the like of a mobile terminal App are realized, developers do not need to draw the page code little by using a canvas technology, and development cost is reduced; the functions of drawing, editing, moving (dragging and pulling), rotating, zooming, turning and the like of the page module are realized by combining the webpage technology with the functions of the App, and more optimized product functions are realized.
In order that the objects, technical solutions and advantages of the present invention will become more apparent, the present invention will be further described in detail with reference to the accompanying drawings in conjunction with the following specific embodiments.
In describing particular embodiments, specific details of structures, properties, effects, or other features are set forth in order to provide a thorough understanding of the embodiments by one skilled in the art. However, it is not excluded that a person skilled in the art may implement the invention in a specific case without the above-described structures, performances, effects or other features.
The flow chart in the drawings is only an exemplary flow demonstration, and does not represent that all the contents, operations and steps in the flow chart are necessarily included in the scheme of the invention, nor does it represent that the execution is necessarily performed in the order shown in the drawings. For example, some operations/steps in the flowcharts may be divided, some operations/steps may be combined or partially combined, and the like, and the execution order shown in the flowcharts may be changed according to actual situations without departing from the gist of the present invention.
The block diagrams in the figures generally represent functional entities and do not necessarily correspond to physically separate entities. I.e. these functional entities may be implemented in the form of software, or in one or more hardware modules or integrated circuits, or in different network and/or processing unit devices and/or microcontroller devices.
The same reference numerals denote the same or similar elements, components, or parts throughout the drawings, and thus, a repetitive description thereof may be omitted hereinafter. It will be further understood that, although the terms first, second, third, etc. may be used herein to describe various elements, components, or sections, these elements, components, or sections should not be limited by these terms. That is, these phrases are used only to distinguish one from another. For example, a first device may also be referred to as a second device without departing from the spirit of the present invention. Furthermore, the term "and/or", "and/or" is intended to include all combinations of any one or more of the listed items.
The terms referred to in the present invention and their explanations are as follows.
Android and Ios native refer to a mode that android and Ios developers realize without the help of other technologies.
The canvas mainly refers to that android and Ios are implemented in the form of canvas for some control elements which are not available.
The Web refers to Web page technology.
The flash back rate (Crush rate) refers to App crash flash back rate.
Text editing refers to functions similar to Word, such as editing characters, changing size, font, and centering.
The table editing means that an editing function like Word or the like can be realized.
The picture editing means that functions such as picture filtering, clipping and the like can be realized.
Theme editing means similar to photo frame background.
The doodle editing means that the mobile phone App canvas realizes the drawing function.
Touch refers to a Touch event at the mobile phone end and is divided into starting and moving.
Action refers to the way that a Web page sends a data request to an App.
Example 1
Next, a specific embodiment of the picture generation method of the present invention will be described with reference to fig. 1 to 5.
Fig. 1 shows a flow chart of an example of a picture generation method according to the present invention.
As shown in fig. 1, the picture generation method includes the following steps.
Step S101, receiving user operation.
Step S102, generating a Web page code according to user operation, and analyzing the Web page code to generate a Web page.
Step S103, converting the Web page into a picture.
FIG. 2 is a block diagram illustrating an example of an application scenario of the page layout method according to an embodiment of the present invention.
Specifically, on the visual interface shown in fig. 2, in the page module, the user performs, for example, a move and crop operation on the inserted picture, and the server changes corresponding parameters in the code of the picture and redraws the page element on the presentation page module according to the move and crop of the picture by the user to generate a new picture.
Further, when the user uses the doodle function of the APP, namely clicks the doodle function button of the APP module, the server returns the data corresponding to the doodle to the user, so that the user can carry out operations such as doodle on the page module.
It should be noted that the above description is only given by way of example, and the present invention is not limited thereto. In addition, the picture generation method of the present invention further includes data interaction between the App side and the Web side, specifically referring to fig. 3.
In data interaction between an App end and a Web end, for example, when the Web calls the App, the two sides need to communicate with each other in advance to determine a protocol. For example, if a Web page link is clicked to jump to the App homepage, the name of the protocol can be set to xr:// home, the HTML content is < a href:// home "> view homepage > > >, url changes occur when the link is clicked, and meanwhile, the proxy method of the native WebView is triggered. The agreed protocol is implemented by listening for changes in the url in the proxy method.
On the other hand, App calls the Web, for example, using the calling method of jssting (javascript string), and defines a global method on the Web side in advance. Specifically, the method is realized by using the Webview to execute the calling method, the method can directly return a value to the App end, but in general, the Web end receives a message of the App and performs some operations.
It should be noted that the above data interaction process is only illustrated as an example, and is not to be construed as limiting the invention.
In this example, the picture generation method of the present invention is applied to a terminal, and a picture is generated according to an operation of a user on the terminal. The specific picture generation process will be described in detail below.
Next, in step S101, a user operation is accepted.
Specifically, receiving an operation of a user on a page element, changing a parameter in a code of the page element according to the operation on the page element, and redrawing the page element on the Web page.
In this example, the user operation includes a text input, a touch operation, and the like, and the touch operation includes a moving end click, a movement (drag and drag), a zoom, a rotation, a flip, and the like.
Optionally, the page layout may be implemented by flexible layout of a flex (flexible box, abbreviated as "flexible layout box model") in the CSS, and further, the functions of clicking, moving (dragging and pulling), zooming, rotating, flipping, and the like of the page module may be implemented by using a Web Html tag existing in a block structure.
Next, in step S102, a Web page code is generated according to a user operation, and the Web page code is parsed to generate a Web page.
Specifically, the Web page is composed of page elements, the Web page code is composed of codes of the page elements, and the Web page code is generated according to a user operation, more specifically, the page elements composing the Web page and the codes of the page elements are respectively generated according to the user operation.
Further, the page elements include various elements such as text, pictures, audio, animation, video, and the like.
Further, the code of the page element is generated by the page element code module according to the user operation.
In this example, the page element code module includes at least one of: text template, picture module, picture and text template, background template.
In an example, the user performs a rotation operation on a page element such as an inserted picture, in which case the parameter in the page code includes an arrangement angle, and the parameter in the page code that needs to be changed according to the rotation operation on the picture includes: the method comprises the steps of recording an initial angle formed by two rotating contacts and a current angle formed by two rotating contacts in movement, calculating a rotating direction and a rotating angle based on the difference between the initial angle and the current angle, and calculating an arrangement angle according to the rotating direction and the rotating angle, so that a user can quickly rotate the picture in a page module, namely, the rotating function of the page module can be realized, the consistency of the App end and the webpage front end can be ensured, developers do not need to draw the picture by using a canvas technology, the working efficiency of the developers is improved, the development cost is reduced, and the flash back rate is also reduced.
In another example, the user performs a zoom operation on a page element such as an inserted picture, in which case the parameter in the page code includes a zoom ratio parameter, and changing the parameter in the page code according to the zoom operation on the picture includes: the method comprises the steps of recording an initial distance formed by two movable contacts and a current distance formed by two movable contacts in movement, and determining a scaling parameter by dividing the current distance by the initial distance, so that a user can quickly move the picture in a page module, namely, the moving function of the page module is realized, the consistency of the App end and the webpage front end can be ensured, developers do not need to draw the picture by using canvas technology, the working efficiency of the developers is improved, the development cost is reduced, and the flash retreat rate is also reduced.
In another example, after the user performs scaling, rotation, and clipping operations on the inserted page elements such as the picture, further, when the user completes text input, the App invokes a global method of the Web to transfer data, that is, transfers text data input by the user, specifically, the Web end obtains the text data input by the user, sends the data to the App end by using a method such as Action, and after receiving corresponding text data returned from the server at the App end, the App end correspondingly displays the corresponding text data in the input box.
In the above example, functions of drawing, text editing and the like of the page module are realized by combining the Web page technology and the functions of the App, so that the consistency between the App end and the front end of the Web page is ensured, and the healthy operation of the App is ensured.
It should be noted that the above description is only given by way of example, and the present invention is not limited thereto. In other examples, the App side may directly transmit the relevant data to the Web side.
Next, in step S103, the Web page is converted into a picture.
In this example, a picture is generated according to a user operation, specifically, for example, after a user performs operations such as cutting, rotating, doodling and the like on a photo, a final picture is generated, the picture is saved and a Web page code of the picture is generated, the Web page code is displayed on a page module, and the processed picture is subjected to printing processing (S501), see fig. 5.
To further explain the principle of each operation in the picture generation method, a process of setting or changing parameters in a page code will be explained.
Aiming at the problem that an external Web page has no double-click event, the invention simulates the double-click event of the mobile terminal through a CSS box model at the front end of the Web page so as to realize the double-click operation of the user in the display page of the App terminal, thereby optimizing the picture processing function of the App terminal.
Fig. 4 shows a schematic diagram of a terminal double-click event according to the picture generation method of the present invention.
As shown in fig. 4, by recording the coordinate position (X, Y) of the touch start point touch start (time t1), when the next click is made, recording the coordinate position (X ', Y') of the touch start (time t 2) of the current click, when the distance between the start point and the current point is within the predetermined distance range and the separation time of the two clicks is within the predetermined time period, determining as a double click event, and returning the corresponding data of the terminal based on the double click operation of the user to implement the related display or the graphics and text processing.
It should be noted that the predetermined distance range r is preferably 0 to 10 pixel distances, and the predetermined time period (t2 to t1) is preferably 0 to 300 milliseconds. The foregoing is illustrative only and is not to be construed as limiting the invention.
In addition, for the dragging operation of the user in the page module, the touch starting point and the current position in the movement of the user are recorded, and the updated position is obtained, so that the functions of dragging, pulling, dragging and the like in the page module are realized.
It should be noted that the above-mentioned processes of the image generating method are steps necessary for implementing the method, and are only used for explaining the present invention, and the order and number of the steps are not particularly limited. In addition, the steps in the method may also be split into two or three (for example, the step S103 is split into steps S103 and S501, see fig. 5 in particular), or some steps may also be combined into one step, and the adjustment is performed according to an actual example. In addition, in other embodiments, the Web page may be converted into a picture by other Web page technologies.
Compared with the prior art, the invention can rapidly realize the functions of moving (dragging and pulling), rotating, overturning, zooming and the like of the page block-level operation area through the Web Html tag in a block structure, also simulates a double-click event to realize terminal double-click operation, does not need developers to draw a little by using a canvas technology, and reduces the development cost; the functions of the App and the Web webpage technology are combined to realize the functions of drawing, editing, moving (dragging and pulling), rotating, turning, zooming and the like of the page module, so that the consistency of the App and the front end of the webpage is ensured, the working efficiency of developers is improved, the flash back rate is reduced, the picture generation method is optimized, and the healthy operation of the App is ensured.
Embodiments of the picture generation apparatus of the present invention are described below, which may be used to perform method embodiments of the present invention. The details described in the device embodiments of the invention should be regarded as complementary to the above-described method embodiments; reference is made to the above-described method embodiments for details not disclosed in the apparatus embodiments of the invention.
Example 2
Referring to fig. 6 and 7, the present invention further provides a picture generating apparatus 600 based on a Web page, where the picture generating apparatus 600 includes the following modules: an input module 601, configured to accept user operations; the page generation module 602 is configured to generate a Web page code according to a user operation, and parse the Web page code to generate a Web page; a conversion module 603, configured to convert the Web page into a picture.
As shown in fig. 7, the picture generating apparatus 600 further includes a receiving module 701, where the receiving module 702 is configured to receive an operation performed by a user on the page element, change a parameter in a code of the page element according to the operation performed on the page element, and redraw the page element on the web page.
Optionally, the operation on the page element comprises at least one of: move, zoom, rotate, flip.
Optionally, the operation on the page element is rotation, and the parameter in the code of the page element includes an arrangement angle; the changing parameters in the code of the page element according to the operation on the page element comprises: recording an initial angle formed by the two rotating contacts and a current angle formed by the two rotating contacts in movement, calculating a rotating direction and a rotating angle based on a difference between the initial angle and the current angle, and calculating the arrangement angle according to the rotating direction and the rotating angle.
Optionally, the operation on the page element is zooming, and the parameter in the code of the page element includes a zooming parameter; the changing parameters in the code of the page element according to the operation on the page element comprises: recording an initial distance formed by two moving contacts and a current distance formed by two moving contacts in movement, and determining a scaling parameter by dividing the current distance by the initial distance.
Optionally, the generating, according to the user operation, the page elements constituting the Web page and the code of the page element respectively includes: and generating the code of the page element by the page element code module according to the user operation.
Optionally, the page element code module comprises at least one of: text template, picture module, picture and text template, background template.
Optionally, the page elements include pictures, and the generating the page elements constituting the Web page and the codes of the page elements according to the user operation respectively includes: and generating a picture according to the user operation, storing the picture and generating a Web page code of the picture.
Example 3
In the following, embodiments of the electronic device of the present invention are described, which may be regarded as specific physical implementations for the above-described embodiments of the method and apparatus of the present invention. The details described in the embodiments of the electronic device of the invention should be seen as complementary to the embodiments of the method or the apparatus described above.
Fig. 8 is a schematic structural diagram of an electronic device according to an embodiment of the present invention, which includes a processor and a memory, where the memory is used to store a computer-executable program, and when the computer program is executed by the processor, the processor executes a picture generation method based on a Web page.
Optionally, the present invention further provides a printing apparatus for generating a picture and printing the picture according to an operation of a user on a terminal, including a printing device and the picture generating device of the present invention, where the picture generating device is configured to generate the picture according to the operation of the user and send the generated picture to the printing device, the printing device is configured to print the picture, and the picture generating device is capable of executing the picture generating method of the present invention.
As shown in fig. 8, the electronic device is in the form of a general purpose computing device. The processor can be one or more and can work together. The invention also does not exclude that distributed processing is performed, i.e. the processors may be distributed over different physical devices. The electronic device of the present invention is not limited to a single entity, and may be a sum of a plurality of entity devices.
The memory stores a computer executable program, typically machine readable code. The computer readable program may be executed by the processor to enable an electronic device to perform the method of the invention, or at least some of the steps of the method.
The memory may include volatile memory, such as Random Access Memory (RAM) and/or cache memory, and may also be non-volatile memory, such as read-only memory (ROM).
Optionally, in this embodiment, the electronic device further includes an I/O interface, which is used for data exchange between the electronic device and an external device. The I/O interface may be a local bus representing one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, and/or a memory storage device using any of a variety of bus architectures.
It should be understood that the electronic device shown in fig. 8 is only one example of the present invention, and elements or components not shown in the above example may be further included in the electronic device of the present invention. For example, some electronic devices further include a display unit such as a display screen, and some electronic devices further include a human-computer interaction element such as a button, a keyboard, and the like. Electronic devices are considered to be covered by the present invention as long as the electronic devices are capable of executing a computer-readable program in a memory to implement the method of the present invention or at least a part of the steps of the method.
Fig. 9 is a schematic diagram of a computer-readable recording medium of an embodiment of the present invention. As shown in fig. 9, the computer-readable recording medium has stored therein a computer-executable program that, when executed, implements the above-described Web page-based picture generation method of the present invention. The computer readable storage medium may include a propagated data signal with readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A readable storage medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a readable storage medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., through the internet using an internet service provider).
From the above description of the embodiments, those skilled in the art will readily appreciate that the present invention can be implemented by hardware capable of executing a specific computer program, such as the system of the present invention, and electronic processing units, servers, clients, mobile phones, control units, processors, etc. included in the system, and the present invention can also be implemented by a vehicle including at least a part of the above system or components. The invention can also be implemented by computer software for performing the method of the invention, for example, by control software executed by a microprocessor, an electronic control unit, a client, a server, etc. of the locomotive side. It should be noted that the computer software for executing the method of the present invention is not limited to be executed by one or a specific hardware entity, but may also be implemented in a distributed manner by hardware entities without specific details, for example, some method steps executed by the computer program may be executed at the locomotive end, and another part may be executed in the mobile terminal or the smart helmet, etc. For computer software, the software product may be stored in a computer readable storage medium (which may be a CD-ROM, a usb disk, a removable hard disk, etc.) or may be distributed over a network, as long as it enables the electronic device to perform the method according to the present invention.
Through the above description of the embodiments, those skilled in the art will readily understand that the present invention is not fully described in the above description of the embodiments, and may also be applied to other products including interaction between a computer application and an html page. For example, functions such as moving end drawing, editing, moving (dragging), rotating, or zooming are implemented on a browser page.
While the foregoing embodiments have described the objects, aspects and advantages of the present invention in further detail, it should be understood that the present invention is not inherently related to any particular computer, virtual machine or electronic device, and various general-purpose machines may be used to implement the present invention. The invention is not to be considered as limited to the specific embodiments thereof, but is to be understood as being modified in all respects, all changes and equivalents that come within the spirit and scope of the invention.
Claims (10)
1. A picture generation method based on Web pages is applied to a terminal and generates pictures according to the operation of a user on the terminal, and is characterized by comprising the following steps:
receiving user operation;
generating a Web page code according to user operation, and analyzing the Web page code to generate a Web page;
and converting the Web page into a picture.
2. The picture generation method according to claim 1, wherein the Web page is composed of page elements, the Web page code is composed of codes of the page elements, and generating the Web page code according to the user operation includes: and respectively generating page elements forming the Web page and codes of the page elements according to user operation.
3. The picture generation method according to claim 2, further comprising: and receiving the operation of the user on the page element, changing the parameter in the code of the page element according to the operation on the page element, and redrawing the page element on the Web page.
Optionally, the operation on the page element comprises at least one of: move, zoom, rotate, flip.
4. The picture generation method according to any one of claims 1 to 3,
the operation of the page element is rotation, and the parameter in the code of the page element comprises an arrangement angle;
the changing parameters in the code of the page element according to the operation on the page element comprises: recording an initial angle formed by the two rotating contacts and a current angle formed by the two rotating contacts in movement, calculating a rotating direction and a rotating angle based on a difference between the initial angle and the current angle, and calculating the arrangement angle according to the rotating direction and the rotating angle.
Optionally, the operation on the page element is zooming, and the parameter in the code of the page element includes a zooming parameter;
the changing parameters in the code of the page element according to the operation on the page element comprises:
recording an initial distance formed by two moving contacts and a current distance formed by two moving contacts in movement, and determining a scaling parameter by dividing the current distance by the initial distance.
5. The page generation method according to any one of claims 1 to 3, wherein the generating, according to the user operation, the page elements constituting the Web page and the codes of the page elements respectively includes:
and generating the code of the page element by the page element code module according to the user operation.
6. The page generating method of claim 5, wherein the page element code module comprises at least one of: text template, picture module, picture and text template, background template.
7. The page generation method according to claim 2, wherein the page element includes a picture, and the generating the page elements constituting the Web page and the codes of the page elements according to the user operation respectively includes:
and generating a picture according to the user operation, storing the picture and generating a Web page code of the picture.
8. A picture generating device based on Web pages is characterized by comprising the following modules:
the input module is used for receiving user operation;
the page generation module is used for generating a Web page code according to user operation and analyzing the Web page code to generate a Web page;
and the conversion module is used for converting the Web page into a picture.
9. A printing apparatus for generating a picture and printing the picture according to an operation of a user on a terminal, comprising picture generating means for generating a picture according to the operation of the user and transmitting the generated picture to printing means, and printing means for printing the picture, characterized in that:
the picture generation apparatus is capable of executing the picture generation method of any one of claims 1 to 7.
10. A computer-readable medium storing a computer-executable program, wherein the computer-executable program, when executed, implements the picture generation method as claimed in any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010463632.7A CN111597010A (en) | 2020-05-27 | 2020-05-27 | Method and device for generating pictures of Web pages, printing equipment and recording medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010463632.7A CN111597010A (en) | 2020-05-27 | 2020-05-27 | Method and device for generating pictures of Web pages, printing equipment and recording medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN111597010A true CN111597010A (en) | 2020-08-28 |
Family
ID=72181718
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010463632.7A Pending CN111597010A (en) | 2020-05-27 | 2020-05-27 | Method and device for generating pictures of Web pages, printing equipment and recording medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111597010A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112486975A (en) * | 2020-12-10 | 2021-03-12 | 四川瀚库智数科技有限公司 | Method for automatically visualizing data based on big data |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
AU2004201773A1 (en) * | 2004-04-28 | 2004-06-03 | Canon Information Systems Research Australia Pty Ltd | Method of Printing a Selected Element within a Web Page |
CN103176659A (en) * | 2013-03-28 | 2013-06-26 | 成都信息工程学院 | Touch response accelerating method based on mobile web |
CN104380280A (en) * | 2012-04-16 | 2015-02-25 | 权五石 | System and method for dynamically converting webpage, and computer-readable recording medium |
CN105447096A (en) * | 2015-11-09 | 2016-03-30 | 百度在线网络技术(北京)有限公司 | Web page generation method and apparatus |
CN109062471A (en) * | 2018-07-10 | 2018-12-21 | 广州视源电子科技股份有限公司 | Mobile display method, device, equipment and medium for page elements |
CN110888574A (en) * | 2019-10-12 | 2020-03-17 | 平安普惠企业管理有限公司 | Self-adaption method, device and equipment for page display and computer storage medium |
CN111198738A (en) * | 2019-12-20 | 2020-05-26 | 北京你财富计算机科技有限公司 | Mobile terminal page display method and device and electronic equipment |
-
2020
- 2020-05-27 CN CN202010463632.7A patent/CN111597010A/en active Pending
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
AU2004201773A1 (en) * | 2004-04-28 | 2004-06-03 | Canon Information Systems Research Australia Pty Ltd | Method of Printing a Selected Element within a Web Page |
CN104380280A (en) * | 2012-04-16 | 2015-02-25 | 权五石 | System and method for dynamically converting webpage, and computer-readable recording medium |
CN103176659A (en) * | 2013-03-28 | 2013-06-26 | 成都信息工程学院 | Touch response accelerating method based on mobile web |
CN105447096A (en) * | 2015-11-09 | 2016-03-30 | 百度在线网络技术(北京)有限公司 | Web page generation method and apparatus |
CN109062471A (en) * | 2018-07-10 | 2018-12-21 | 广州视源电子科技股份有限公司 | Mobile display method, device, equipment and medium for page elements |
CN110888574A (en) * | 2019-10-12 | 2020-03-17 | 平安普惠企业管理有限公司 | Self-adaption method, device and equipment for page display and computer storage medium |
CN111198738A (en) * | 2019-12-20 | 2020-05-26 | 北京你财富计算机科技有限公司 | Mobile terminal page display method and device and electronic equipment |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112486975A (en) * | 2020-12-10 | 2021-03-12 | 四川瀚库智数科技有限公司 | Method for automatically visualizing data based on big data |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106991154B (en) | Webpage rendering method and device, terminal and server | |
CN110781423B (en) | Webpage generation method and device and electronic equipment | |
CN110096277B (en) | Dynamic page display method and device, electronic equipment and storage medium | |
EP3518124A1 (en) | Webpage rendering method and related device | |
US10339209B2 (en) | Webpage display method and device | |
WO2014071749A1 (en) | Html5-protocol-based webpage presentation method and device | |
JP2011159284A (en) | Website font previewing | |
US9886465B2 (en) | System and method for rendering of hierarchical data structures | |
CN112561640A (en) | Commodity page template generation method and device, computer equipment and storage medium | |
CN104050185A (en) | Zoom-display processing method and device for page contents | |
CN106874271A (en) | A kind of method and system that PC webpages are converted to mobile terminal webpage | |
CN113326043B (en) | Webpage rendering method, webpage manufacturing method and webpage rendering system | |
CN111399831A (en) | Page display method and device, storage medium and electronic device | |
CN113535164A (en) | Front-end interface generation method and device, electronic equipment and storage medium | |
CN106155654B (en) | Method and device for shielding webpage operation and electronic equipment | |
CN104156421B (en) | The page shows method, apparatus and system | |
US10747943B2 (en) | Method, device, client apparatus, and electronic device for presenting webpages | |
CN111597010A (en) | Method and device for generating pictures of Web pages, printing equipment and recording medium | |
CN116009863B (en) | Front-end page rendering method, device and storage medium | |
CN115659087B (en) | Page rendering method, equipment and storage medium | |
CN102841890B (en) | A kind of data processing method for document structure and device | |
CN116578795A (en) | Webpage generation method and device, storage medium and electronic equipment | |
CN115474074B (en) | Video background replacement method, device, computing equipment and storage medium | |
CN111651107A (en) | 3D model front-end display method, device, equipment and medium | |
JP2006331348A (en) | Method, apparatus, program for collecting comment trackback of trackback source |
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 | ||
TA01 | Transfer of patent application right | ||
TA01 | Transfer of patent application right |
Effective date of registration: 20230724 Address after: 6001, 6th Floor, No.1 Kaifeng Road, Shangdi Information Industry Base, Haidian District, Beijing, 100085 Applicant after: Beijing Baige Feichi Technology Co.,Ltd. Address before: Room 4003, floor 4, No. 18, Shangdi Information Road, Haidian District, Beijing 100085 Applicant before: Beijing Zhimei Zhixue Technology Co.,Ltd. |