CN107807973A - A kind of method for being embedded into picture according to URL addresses generation Quick Response Code - Google Patents

A kind of method for being embedded into picture according to URL addresses generation Quick Response Code Download PDF

Info

Publication number
CN107807973A
CN107807973A CN201710986435.1A CN201710986435A CN107807973A CN 107807973 A CN107807973 A CN 107807973A CN 201710986435 A CN201710986435 A CN 201710986435A CN 107807973 A CN107807973 A CN 107807973A
Authority
CN
China
Prior art keywords
picture
quick response
response code
embedded
async
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
Application number
CN201710986435.1A
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.)
G Cloud Technology Co Ltd
Original Assignee
G Cloud 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 G Cloud Technology Co Ltd filed Critical G Cloud Technology Co Ltd
Priority to CN201710986435.1A priority Critical patent/CN107807973A/en
Publication of CN107807973A publication Critical patent/CN107807973A/en
Withdrawn legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/955Retrieval from the web using information identifiers, e.g. uniform resource locators [URL]
    • G06F16/9554Retrieval from the web using information identifiers, e.g. uniform resource locators [URL] by using bar codes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/955Retrieval from the web using information identifiers, e.g. uniform resource locators [URL]
    • G06F16/9566URL specific, e.g. using aliases, detecting broken or misspelled links
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/44Encoding

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Software Systems (AREA)
  • Stored Programmes (AREA)

Abstract

The present invention relates to web development technologies field, especially a kind of Quick Response Code generated according to URL addresses is embedded into the method for picture.The method of the present invention is under node.js environment, and installation qr image module applications are in generation Quick Response Code, the method for editor's generation two-dimension code image;Images module applications are installed in processing picture, the method for editing embedded Quick Response Code;Foregoing 2 methods are encapsulated to util.js;Then asynchronous process control module async is installed, combine foregoing 2 methods to async;The packaged flow path processing methods of async are performed, generate the picture of embedded Quick Response Code.The present invention helps to provide the help and reference that picture function is handled on line, greatly reduces the operating time that user handles picture, saves the step of installing special disposal picture software instrument.

Description

A kind of method for being embedded into picture according to URL addresses generation Quick Response Code
Technical field
The present invention relates to web development technologies field, particularly a kind of Quick Response Code generated according to URL addresses is embedded into figure The method of piece.
Background technology
The Quick Response Code of special disposal generation at present is embedded into function on the line on picture and compares shortage;Much all simply generate two Code is tieed up, can not be embedded in the function of original picture;Had a greatly reduced quality on the usage degree for meet user.
The content of the invention
Present invention solves the technical problem that it is to provide a kind of side for being embedded into picture according to URL addresses generation Quick Response Code Method;Help to provide the help and reference that picture function is handled on line, greatly reduce the operating time that user handles picture, save The step of installing special disposal picture software instrument.
The present invention solve above-mentioned technical problem technical scheme be:
Under node.js environment, installation qr-image module applications generate two-dimension code image in generation Quick Response Code, editor Method;Images module applications are installed in processing picture, the method for editing embedded Quick Response Code;Foregoing 2 methods are encapsulated to arrive util.js;Then asynchronous process control module async is installed, combine foregoing 2 methods to async;It is packaged to perform async Flow path processing method, export the picture of embedded Quick Response Code.
Call qr-image intermediate controls, configuration variables parameter url, picture format, size and callback call back functions; Combined by the use of date plus random number as picture name, picture name be nested on fs.createWriteStream functions, Daily record plus abnormal conditions is exported, the method for completing generation Quick Response Code, then method is encapsulated in inside utils { }.
Call images storehouses, configuration variables parameter original picture path, two-dimension code image path callback call back functions;Adjust With the size of .size () method configuration picture .draw () configurations two-dimension code image is called to be embedded into the position in original picture Put, call .save () method to preserve picture to file, complete the method for embedded Quick Response Code, then method is encapsulated in Inside utils { }.
Utils files and async control are quoted on js files, has configured the parameter in the method for Quick Response Code generation, Url addresses are added, are packaged into task1 variable methods, the path of original picture is configured to being embedded in the parameter of Quick Response Code, is packaged into Task2 variable methods, finally in calling two methods of async.waterfall combination of function task1 and task2 to operation flow Carry out step-by-step processing, generate Quick Response Code method (task1) put before, the method (task2) of embedded Quick Response Code adds behind putting The daily record output of abnormal conditions, completes whole asynchronous flow control method.
The packaged flow path processing methods of async are performed, result exports the picture path after embedded Quick Response Code, opens text Part folder realizes preview picture effect.
The generation Quick Response Code module qr-image that the present invention is provided using nodejs core tool, embedded picture watermark mould Block images and asynchronous process control module async.The implementation process of overall procedure, which helps to provide on line, handles picture function Help and reference, greatly reduce user handle picture operating time, save installation special disposal picture software instrument step Suddenly.Inventive method of the present invention helps to provide the operation of more preferable processing picture and valuable referential on platform line, it is not necessary to The processing of background java code, it is only necessary to realized in page front end, processing logic is fairly simple, understandable, and favorable expandability, energy It is transformed into batch processing or freely pulls the position of two-dimension code image.
Brief description of the drawings
The present invention is further described below in conjunction with the accompanying drawings:
Fig. 1 is the flow chart of the present invention;
Fig. 2 is present invention generation Quick Response Code method and embedded picture approach code sectional drawing;
Fig. 3 is the execution method code sectional drawing of Row control combination of the present invention.
Embodiment
Below in conjunction with accompanying drawing, clear, complete description is carried out to the technical scheme in the embodiment of the present invention, it is clear that institute The embodiment of description is only part of the embodiment of the present invention, rather than whole embodiments.Based on the embodiment in the present invention, Those of ordinary skill in the art are not making the substantive scheme created and obtained, and belong to the scope of protection of the invention.
As Fig. 1, specific implementation step of the invention are as follows:
1st, nodejs instruments are downloaded, are installed on local development environment.Detect whether that success has been installed after installation, under double-click The installation kit Node.exe of load, meeting eject command row window, is inputted on window:Cd node installation directory address, then it is defeated Enter:-- version, window can export node version number, prove that node has installed success this moment.
The 2nd, qr-image modules are installed, this module is mainly used in generation Quick Response Code, and npm is inputted in command window Install qr-image, installed successfully after execution.
3rd, the method for editor's generation two-dimension code image, calls qr-image intermediate controls, configuration variables parameter url, picture Form, size and callback call back functions.By the use of date plus random number combination as picture name, picture name is nested into On fs.createWriteStream functions, the daily record plus abnormal conditions exports, and the method for whole generation Quick Response Code is substantially complete Into, then method is encapsulated in inside utils { }.
The 4th, images modules are installed, the method that this module is mainly used in processing picture synthesising picture is defeated in command window Enter npm install images, installed successfully after execution.
5th, the method for editing embedded Quick Response Code, calls images storehouses, configuration variables parameter original picture path, two-dimension code image Path callback call back functions.The size of the .size () method of calling configuration picture, call .draw () configuration Quick Response Codes Picture is embedded into the position in original picture, calls .save () method to preserve picture and is entirely embedded in Quick Response Code on file Method is basically completed, then method is encapsulated in inside utils { }.
The 6th, asynchronous process control module async is installed, this module application is in combination producing Quick Response Code and embedded Quick Response Code The control of two method flows, npm install async are inputted in command window, are installed successfully after execution.
7th, asynchronous flow control method is edited, utils files and async control, configuration two are quoted on js files The parameter in the method for code generation is tieed up, url addresses is added, is packaged into task1 variable methods, configures the path of original picture to being embedded in In the parameter of Quick Response Code, be packaged into task2 variable methods, finally call async.waterfall combination of function task1 and Two methods of task2 to step-by-step processing is carried out in operation flow, generate Quick Response Code method (task1) put before, embedded two dimension Behind the method (task2) of code is put, the daily record plus abnormal conditions exports, and whole flow process control method just finishes.
8th, the packaged flow path processing methods of async are performed, result exports the picture path after embedded Quick Response Code, opened File can preview picture effect.
Present invention generation Quick Response Code method and embedded picture approach, the code sectional drawing of the execution method of control combination are shown in respectively Shown in Fig. 2, Fig. 3.

Claims (7)

1. a kind of Quick Response Code generated according to URL addresses is embedded into the method for picture, it is characterised in that:Under node.js environment, Qr-image module applications are installed in generation Quick Response Code, the method for editor's generation two-dimension code image;Images module applications are installed In processing picture, the method for editing embedded Quick Response Code;Foregoing 2 methods are encapsulated to util.js;Then asynchronous Row control is installed Module async, foregoing 2 methods are combined to async;The packaged flow path processing methods of async are performed, export embedded Quick Response Code Picture.
2. according to the method for claim 1, it is characterised in that:Call qr-image intermediate controls, configuration variables parameter Url, picture format, size and callback call back functions;By the use of date plus random number combination as picture name, picture name Title is nested on fs.createWriteStream functions, and the daily record plus abnormal conditions exports, and completes the side of generation Quick Response Code Method, then method is encapsulated in inside utils { }.
3. according to the method for claim 1, it is characterised in that:Calling images storehouses, configuration variables parameter original picture path, Two-dimension code image path callback call back functions;The size of the .size () method of calling configuration picture, calls .draw () Configuration two-dimension code image is embedded into the position in original picture, calls .save () method to preserve picture to file, completes embedding Enter the method for Quick Response Code, then method is encapsulated in inside utils { }.
4. according to the method for claim 2, it is characterised in that:Calling images storehouses, configuration variables parameter original picture path, Two-dimension code image path callback call back functions;The size of the .size () method of calling configuration picture, calls .draw () Configuration two-dimension code image is embedded into the position in original picture, calls .save () method to preserve picture to file, completes embedding Enter the method for Quick Response Code, then method is encapsulated in inside utils { }.
5. according to the method described in any one of Claims 1-4, it is characterised in that:On js files quote utils files and Async control, the parameter in the method for Quick Response Code generation is configured, added url addresses, be packaged into task1 variable methods, match somebody with somebody The path of original picture is put to being embedded in the parameter of Quick Response Code, task2 variable methods is packaged into, finally calls Two methods of async.waterfall combination of function task1 and task2 are to carrying out step-by-step processing, generation two dimension in operation flow Before the method (task1) of code is put, behind the method (task2) of embedded Quick Response Code is put, the daily record plus abnormal conditions exports, complete Into whole asynchronous flow control method.
6. according to the method described in any one of Claims 1-4, it is characterised in that:Perform the packaged flow processing sides of async Method, result export the picture path after embedded Quick Response Code, and opened file folder realizes preview picture effect.
7. according to the method for claim 5, it is characterised in that:Perform the packaged flow path processing methods of async, result Picture path after the embedded Quick Response Code of output, opened file folder realize preview picture effect.
CN201710986435.1A 2017-10-20 2017-10-20 A kind of method for being embedded into picture according to URL addresses generation Quick Response Code Withdrawn CN107807973A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710986435.1A CN107807973A (en) 2017-10-20 2017-10-20 A kind of method for being embedded into picture according to URL addresses generation Quick Response Code

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710986435.1A CN107807973A (en) 2017-10-20 2017-10-20 A kind of method for being embedded into picture according to URL addresses generation Quick Response Code

Publications (1)

Publication Number Publication Date
CN107807973A true CN107807973A (en) 2018-03-16

Family

ID=61592341

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710986435.1A Withdrawn CN107807973A (en) 2017-10-20 2017-10-20 A kind of method for being embedded into picture according to URL addresses generation Quick Response Code

Country Status (1)

Country Link
CN (1) CN107807973A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109902242A (en) * 2019-02-28 2019-06-18 尤尼泰克(嘉兴)信息技术有限公司 A kind of picture storage method in two dimensional code

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103902711A (en) * 2014-04-01 2014-07-02 深圳市茁壮网络股份有限公司 Method and system for embedding two-dimension code images into webpages

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103902711A (en) * 2014-04-01 2014-07-02 深圳市茁壮网络股份有限公司 Method and system for embedding two-dimension code images into webpages

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
意外金喜: "nodejs根据地址生成二维码并当做水印嵌入图片中", 《HTTPS://BLOG.CSDN.NET/ZZWWJJDJ1/ARTICLE/DETAILS/52912181》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109902242A (en) * 2019-02-28 2019-06-18 尤尼泰克(嘉兴)信息技术有限公司 A kind of picture storage method in two dimensional code
CN109902242B (en) * 2019-02-28 2021-09-21 尤尼泰克(嘉兴)信息技术有限公司 Picture storage method in two-dimensional code

Similar Documents

Publication Publication Date Title
CN101526942A (en) Component implementation technology for automatically generating dynamic web page on line in real time
CN110008195B (en) Method, device and system for dynamically configuring html (hypertext markup language) to pdf (pdf)
US7093264B2 (en) Method and apparatus for assembling Enterprise JavaBeans components
CA2201254A1 (en) A system for automated interface generation for computer programs operating in different environments
US20090037801A1 (en) Method and apparatus for automatic user manual generation
CN108052548A (en) Method, system and the terminal device that a kind of webpage creates
CN105550165A (en) Plug-in and method capable of importing webpage article into webpage text editor
CN1808390A (en) Method for processing cut and pasted data
CN101118558A (en) Converting method and apparatus for resource file
CN107807973A (en) A kind of method for being embedded into picture according to URL addresses generation Quick Response Code
CN110780971A (en) Method and system for realizing visual medical data mapping and converting tool
CN102023987A (en) Method and device for processing WEB document
CN110471659B (en) Multilingual implementation method and system, man-machine interface configuration software end and equipment end
CN102043807A (en) Web page generating system and method based on configuration files
CN108549693B (en) CMS page generation method based on crawler technology
KR100751449B1 (en) STUB BUNDLE PRODUCTION METHOD BASED OSGi SERVICE PLATFORM
CN101655797A (en) Establishing method of member and function library with description information
US20030145051A1 (en) Method and system for selecting multiple sets of data in an application
JP2009134445A (en) Software component extraction support device
CN112269671A (en) Method for using Office programming interface in webpage
CN101800803A (en) Method for editing multimedia message and mobile communication terminal
CN106897256A (en) A kind of formula by Office software editings is converted into the method and device of MathML formula
KR100943876B1 (en) Wireless communication device
KR20020041379A (en) Algorithms and implementations for automatic generation of dactychirogram basecd on text input
CN101211275B (en) Message pumping method and system

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: 20180316