CN109634540B - Mobile phone control image printing method and mobile phone - Google Patents

Mobile phone control image printing method and mobile phone Download PDF

Info

Publication number
CN109634540B
CN109634540B CN201811442169.7A CN201811442169A CN109634540B CN 109634540 B CN109634540 B CN 109634540B CN 201811442169 A CN201811442169 A CN 201811442169A CN 109634540 B CN109634540 B CN 109634540B
Authority
CN
China
Prior art keywords
line
printing
mobile phone
monochrome
image
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201811442169.7A
Other languages
Chinese (zh)
Other versions
CN109634540A (en
Inventor
唐朝
杨星
乔大勇
倪丽娜
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Xinguodu Tech Co Ltd
Original Assignee
Shenzhen Xinguodu Tech 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 Shenzhen Xinguodu Tech Co Ltd filed Critical Shenzhen Xinguodu Tech Co Ltd
Priority to CN201811442169.7A priority Critical patent/CN109634540B/en
Publication of CN109634540A publication Critical patent/CN109634540A/en
Application granted granted Critical
Publication of CN109634540B publication Critical patent/CN109634540B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input 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/12Digital output to print unit, e.g. line printer, chain printer
    • G06F3/1201Dedicated interfaces to print systems
    • G06F3/1223Dedicated interfaces to print systems specifically adapted to use a particular technique
    • G06F3/1237Print job management
    • G06F3/1238Secure printing, e.g. user identification, user rights for device usage, unallowed content, blanking portions or fields of a page, releasing held jobs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input 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/12Digital output to print unit, e.g. line printer, chain printer
    • G06F3/1201Dedicated interfaces to print systems
    • G06F3/1202Dedicated interfaces to print systems specifically adapted to achieve a particular effect
    • G06F3/1203Improving or facilitating administration, e.g. print management
    • G06F3/1208Improving or facilitating administration, e.g. print management resulting in improved quality of the output result, e.g. print layout, colours, workflows, print preview
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input 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/12Digital output to print unit, e.g. line printer, chain printer
    • G06F3/1201Dedicated interfaces to print systems
    • G06F3/1223Dedicated interfaces to print systems specifically adapted to use a particular technique
    • G06F3/1237Print job management
    • G06F3/124Parallel printing or parallel ripping
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The invention discloses a mobile phone control image printing method and a mobile phone. The method comprises the following steps: the method comprises the following steps: s1, acquiring an image to be printed, and decomposing the image into a plurality of lines according to a preset line division rule; s2, setting a printing process and a drawing process in parallel based on the processing capacity of the mobile phone, wherein the printing process is used for acquiring the printing authority of the thermal printer, and the drawing process is used for drawing a monochrome bmp picture line by line; and S3, when the drawing process finishes drawing a row of monochrome bmp images, the printing process analyzes the dot rows corresponding to the row of monochrome bmp images and sends the analyzed data to the thermal printer. The handset is used to perform the method. According to the invention, the image to be printed is divided into a plurality of lines, the processing capacity requirement of the single chip microcomputer can be reduced through the parallel printing process and the drawing process, and the processing efficiency and the printing effect of the thermal printer are improved.

Description

Mobile phone control image printing method and mobile phone
Technical Field
The invention relates to the technical field of printing, in particular to a mobile phone image printing control method and a mobile phone.
Background
The thermal printer works on the principle that a semiconductor heating element is arranged on a printing head, the printing head can print required patterns after being heated and contacted with thermal printing paper, the principle is similar to that of a thermal fax machine, the images are generated by heating and generating chemical reaction in a film, the chemical reaction of the thermal printer is carried out at a certain temperature, and the chemical reaction can be accelerated at a high temperature. The singlechip of the low-cost thermal printer does not have a large storage space and a strong computing power, so that a word stock cannot be stored in the flash of the singlechip, the singlechip cannot be used for image splicing with a large algorithm difficulty, and the problems in actual use are as follows:
if the printing document is long and the content is large, the time for drawing the monochrome BMP picture at the output end of the data is long. The printing parameters are single, the parameters of the single chip microcomputer cannot be dynamically adjusted, the best effect cannot be printed by using fixed parameters, for example, Chinese characters are better seen, but when dense two-dimensional codes are printed, the two-dimensional codes are blurred due to the fact that the heating time is too long, and the like.
Disclosure of Invention
The present invention is directed to solving, at least to some extent, one of the technical problems in the related art. To this end, an object of the present invention is to provide an image printing method of a mobile phone and a mobile phone.
The technical scheme adopted by the invention is as follows:
in a first aspect, the present invention provides a method for controlling image printing by a mobile phone, which is suitable for a thermal printer controlled by a single chip, and comprises: s1, acquiring an image to be printed, and decomposing the image into a plurality of lines according to a preset line division rule; s2, setting a printing process and a drawing process in parallel based on the processing capacity of the mobile phone, wherein the printing process is used for acquiring the printing authority of the thermal printer, and the drawing process is used for drawing a monochrome bmp picture line by line; and S3, when the drawing process finishes drawing a row of monochrome bmp images, the printing process analyzes the dot rows corresponding to the row of monochrome bmp images and sends the analyzed data to the thermal printer.
Preferably, the printing process is specifically configured to acquire the printing authority of the thermal printer and wait for the drawing process to finish drawing the monochrome bmp map in at least one line.
Preferably, the line-dividing rule includes a direction in which a left-right direction is a line, a top-bottom direction is a decomposition direction, and a distance is a line height.
Preferably, the line division rule includes a direction of a line in a left-right direction, a direction of a decomposition in an up-down direction, a pixel that meets a threshold value is marked as a blank, and an end point/start point of the line is set in the blank space.
Preferably, the line-dividing rule specifically includes taking the left-right direction as the line direction, taking the up-down direction as the decomposition direction, marking pixels meeting a threshold as blank, marking a blank space of a line in a line unit when all pixels of the line are blank, and setting an end point/start point of the line in the blank space.
In a second aspect, the present invention provides a mobile phone suitable for a thermal printer controlled by a single chip, the mobile phone comprising: the receiving module is used for acquiring an image to be printed and decomposing the image into a plurality of lines according to a preset line division rule; the system comprises a processing module, a processing module and a drawing module, wherein the processing module is used for setting a printing process and a drawing process which are parallel based on the processing capacity of a mobile phone, the printing process is used for acquiring the printing authority of the thermal printer, and the drawing process is used for drawing a monochrome bmp picture line by line; and the printing module is used for starting the printing process to analyze the dot lines corresponding to a row of the monochromatic bmp images and sending the analyzed data to the thermal printer when the drawing process finishes drawing a row of the monochromatic bmp images.
Preferably, the printing process is specifically configured to acquire the printing authority of the thermal printer and wait for the drawing process to finish drawing the monochrome bmp map in at least one line.
Preferably, the line-dividing rule includes a direction in which a left-right direction is a line, a top-bottom direction is a decomposition direction, and a distance is a line height.
Preferably, the line-dividing rule includes a left-right direction as a line direction, a top-bottom direction as a decomposition direction, a pixel meeting a threshold is marked as a blank, and an end point/start point of a line is set in the blank space.
Preferably, the line-dividing rule specifically includes taking the left-right direction as the line direction, taking the up-down direction as the decomposition direction, marking pixels meeting a threshold as blank, marking a blank space of a line in a line unit when all pixels of the line are blank, and setting an end point/start point of the line in the blank space.
The invention has the beneficial effects that:
according to the invention, the image to be printed is divided into a plurality of lines, the processing capacity requirement of the single chip microcomputer can be reduced through the parallel printing process and the drawing process, and the processing efficiency and the printing effect of the thermal printer are improved.
Drawings
FIG. 1 is a schematic diagram of a method for controlling image printing by a mobile phone according to the present invention;
FIG. 2 is a process flow diagram of the present invention;
fig. 3 is a schematic diagram of a mobile phone according to the present invention.
Detailed Description
It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict.
Example 1
This embodiment is provided to illustrate the drawbacks of the prior art and the solution of the present invention.
The existing one-chip thermal printer mainly processes images with low printing difficulty, and meanwhile, for the purpose of developing/improving printing capability, the existing solution is to process the images to be printed by a certain processing end (a computer, a complex processing chip, a mobile phone and other devices with high processing capability), then transmit the printing content to the printer, and heat and feed the printer according to the printing position of the printing content, wherein if the printing document is very long and the content is much, the time required for drawing a monochrome BMP (bone map) at the processing end is very long; the printing parameters are single, the parameters of the single chip microcomputer cannot be dynamically adjusted, the best effect cannot be printed by using fixed parameters, for example, Chinese characters can be better seen, but when dense two-dimensional codes are printed, the two-dimensional codes are fuzzy due to the fact that the heating time is too long, and the like.
The embodiment provides a mobile phone control image printing method as shown in fig. 1: s1, acquiring an image to be printed, and decomposing the image into a plurality of lines according to a preset line division rule; s2, setting a parallel printing process and a drawing process based on the processing capacity of the mobile phone, wherein the printing process is used for acquiring the printing authority of the thermal printer, and the drawing process is used for drawing a monochrome bmp image line by line; and S3, when the drawing process finishes drawing a row of monochrome bmp images, the printing process analyzes the dot rows corresponding to the row of monochrome bmp images and sends the analyzed data to the thermal printer.
The processing flow chart shown in fig. 2, wherein a mobile phone is used as a processing end, an image to be printed is obtained through a preset APP (a specific process may be to call an API of a camera to take a picture, or obtain downloaded data through a network interface), an image is decomposed into a plurality of lines according to a preset line division rule (a left-right direction is used as a line direction, an up-down direction is used as a decomposition direction, and a certain distance is used as a line height), and a parallel printing process and a drawing process are set through the processing capability of the mobile phone, wherein the drawing process is used for drawing the image decomposed into the plurality of lines, and the printing process mainly includes two small steps: 1. when no one line of monochrome bmp image is drawn completely (i.e., the first step of the actual printing process); 2. and (3) each time the drawing process finishes one row of monochromatic bmp images, acquiring the monochromatic bmp images of the row, analyzing corresponding point rows (belonging to analysis data), sending records of the point rows to a thermal printer (single chip microcomputer), and printing by the thermal printer (until each row is printed).
Example 2
This example serves to explain the preferred embodiment.
Some images such as bills and the like include fonts and two-dimensional codes, when the thermal printer is used, because the function limit of the single chip microcomputer and the limit of the existing processing mode (the proper printing parameters cannot be set), the problem of poor printing effect occurs, the embodiment sets multiple printing types, and then the printing types are added into the analytic data, so that the printer can simultaneously acquire the corresponding printing parameters when acquiring the data to be printed, for example:
type 1, chinese 24 size; type 2, ascii character 16 size; type 3, Chinese 24size is thickened and multiplied; type 4, two-dimensional code; type 5, one-dimensional code; type 6, bosch letter ….
When the image is printed, the single chip microcomputer can be informed of the main type of the image through a transmission protocol, and the single chip microcomputer can adjust the printing parameters after receiving the type. For example: first row contents: chinese 24 size; printing parameters: heating time (200), cooling time (100), gray level (2) and the number of heating sections (1); second row content: ascii character 16 size; printing parameters: heating time (100), cooling time (300), gray level (1) and the number of heating sections (3); third row content: two-dimensional codes; printing parameters: heating time (500), cooling time (50), gray scale (2), number of heating stages (2), and the like.
By setting corresponding printing parameters for each line of bmp image, the effect of printing is facilitated to be improved.
Example 3
The embodiment provides a mobile phone, which is suitable for a thermal printer controlled by a single chip microcomputer, and the mobile phone comprises: the system comprises a receiving module 1, a line splitting module and a line printing module, wherein the receiving module 1 is used for acquiring an image to be printed and splitting the image into a plurality of lines according to a preset line splitting rule; the processing module 2 is used for setting a printing process and a drawing process which are parallel based on the processing capacity of the mobile phone, wherein the printing process is used for acquiring the printing authority of the thermal printer, and the drawing process is used for drawing a monochrome bmp picture line by line; and the printing module 3 is used for starting the printing process to analyze the dot lines corresponding to a row of the monochromatic bmp images and sending the analyzed data to the thermal printer when the drawing process finishes drawing a row of the monochromatic bmp images.
While the preferred embodiments of the present invention have been illustrated and described, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the invention as defined by the appended claims.

Claims (10)

1. A method for controlling image printing by a mobile phone is suitable for a thermal printer controlled by a single chip microcomputer, and is characterized by comprising the following steps:
s1, acquiring an image to be printed, and decomposing the image into a plurality of lines according to a preset line division rule;
s2, setting a printing process and a drawing process in parallel based on the processing capacity of the mobile phone, wherein the printing process is used for acquiring the printing authority of the thermal printer, and the drawing process is used for drawing a monochrome bmp picture line by line;
s3, when the drawing process finishes drawing a row of monochrome bmp images, the printing process analyzes the dot rows corresponding to the row of monochrome bmp images and sends the analyzed data to a thermal printer;
wherein the parsed data includes a print type having corresponding print parameters.
2. The method for printing an image controlled by a mobile phone according to claim 1, wherein the printing process is specifically configured to obtain a printing right of the thermal printer and wait for the drawing process to complete drawing of the at least one monochrome bmp image.
3. The method of claim 1, wherein the line division rule includes a left-right direction as a line direction, a top-bottom direction as a decomposition direction, and a distance as a line height.
4. The method of claim 1, wherein the line-dividing rule includes a left-right direction as a line direction, a top-bottom direction as a decomposition direction, pixels meeting a threshold are marked as blank, and an end point/start point of the line is set in the blank space.
5. The method of claim 4, wherein the line-splitting rule specifically includes a left-right direction as a line direction, a top-bottom direction as a decomposition direction, and pixels meeting a threshold are marked as blank, and in a line unit, when all pixels in a line are blank, a blank space of the line is marked, and an end point/a start point of the line is set in the blank space.
6. A mobile phone adapted for use with a one-chip microcomputer controlled thermal printer, the mobile phone comprising:
the receiving module is used for acquiring an image to be printed and decomposing the image into a plurality of lines according to a preset line division rule;
the system comprises a processing module, a processing module and a drawing module, wherein the processing module is used for setting a printing process and a drawing process which are parallel based on the processing capacity of a mobile phone, the printing process is used for acquiring the printing authority of the thermal printer, and the drawing process is used for drawing a monochrome bmp picture line by line;
the printing module is used for starting the printing process to analyze the dot lines corresponding to a row of monochrome bmp images and sending analysis data to the thermal printer when the drawing process finishes drawing a row of monochrome bmp images;
the analysis data comprises a printing type, and the printing type has corresponding printing parameters.
7. The phone of claim 6, wherein the printing process is specifically configured to obtain the printing authority of the thermal printer and wait for the drawing process to complete drawing of the at least one monochrome bmp map.
8. The mobile phone of claim 6, wherein the line-division rule includes a direction of taking a left-right direction as a line, a top-bottom direction as a decomposition direction, and a certain distance as a line height.
9. The mobile phone of claim 6, wherein the line-dividing rule includes a left-right direction as a line direction, a top-bottom direction as a decomposition direction, pixels meeting a threshold are marked as blank, and an end point/start point of a line is set in a blank space.
10. The mobile phone of claim 9, wherein the line-dividing rule specifically includes taking a left-right direction as a line direction, taking a top-bottom direction as a decomposition direction, marking pixels meeting a threshold as blank, marking a blank space of a line in a line unit when all pixels of a line are blank, and setting an end point/start point of a line in the blank space.
CN201811442169.7A 2018-11-29 2018-11-29 Mobile phone control image printing method and mobile phone Active CN109634540B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811442169.7A CN109634540B (en) 2018-11-29 2018-11-29 Mobile phone control image printing method and mobile phone

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811442169.7A CN109634540B (en) 2018-11-29 2018-11-29 Mobile phone control image printing method and mobile phone

Publications (2)

Publication Number Publication Date
CN109634540A CN109634540A (en) 2019-04-16
CN109634540B true CN109634540B (en) 2022-06-07

Family

ID=66070107

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811442169.7A Active CN109634540B (en) 2018-11-29 2018-11-29 Mobile phone control image printing method and mobile phone

Country Status (1)

Country Link
CN (1) CN109634540B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111645432B (en) * 2020-05-28 2022-05-13 上海祥承通讯技术有限公司 Portable printer control system based on smart phone chip
CN112208238A (en) * 2020-10-19 2021-01-12 珠海泽冠科技有限公司 Method for improving paper sticking of thermal printer during printing
CN115760859B (en) * 2023-01-10 2023-04-25 深圳市链科网络科技有限公司 Printing control method and device of thermal printer

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101546384A (en) * 2008-03-25 2009-09-30 富士施乐株式会社 Print control apparatus, printing apparatus and print control method
CN101923450A (en) * 2010-04-23 2010-12-22 中兴通讯股份有限公司 Printing method and device of heat-sensitive printer
CN105469514A (en) * 2014-09-02 2016-04-06 渤海早报网视(天津)文化传播有限公司 Electronic commerce terminal system
CN106313907A (en) * 2016-08-16 2017-01-11 江苏科技大学 Thermal printer text printing method and thermal printer text printing system based on image conversion

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7580151B2 (en) * 2003-10-01 2009-08-25 Seiko Epson Corporation Image processing system and method, printing system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101546384A (en) * 2008-03-25 2009-09-30 富士施乐株式会社 Print control apparatus, printing apparatus and print control method
CN101923450A (en) * 2010-04-23 2010-12-22 中兴通讯股份有限公司 Printing method and device of heat-sensitive printer
CN105469514A (en) * 2014-09-02 2016-04-06 渤海早报网视(天津)文化传播有限公司 Electronic commerce terminal system
CN106313907A (en) * 2016-08-16 2017-01-11 江苏科技大学 Thermal printer text printing method and thermal printer text printing system based on image conversion

Also Published As

Publication number Publication date
CN109634540A (en) 2019-04-16

Similar Documents

Publication Publication Date Title
CN109634540B (en) Mobile phone control image printing method and mobile phone
US20180270387A1 (en) Printing apparatus, server, printing method, and control method
JP2019159633A (en) Image processing apparatus, image processing method, and image processing program
US20030206315A1 (en) Printing utilizing external storage
JP2011084039A (en) Image forming apparatus and image forming system
US7843597B2 (en) Separator page processing system
US20140139856A1 (en) Printing controlling terminal apparatus, image forming apparatus and method for controlling printing using the same
US20160350632A1 (en) Image forming apparatus
KR20180075075A (en) System for using cloud wireless scan
JP2005056414A (en) Method and apparatus for viewing document data on client side
US9727806B2 (en) Image forming apparatus capable of speeding up drawing process, an image forming method, and a non-transitory computer-readable recording medium
CN113377309A (en) Variable two-dimensional code image real-time printing method, device, equipment and medium
JP2008271557A (en) System and method for scheduled distribution of updated documents
CN110134347B (en) Image processing method, image processing device, computer equipment and storage medium
US10419640B1 (en) Text enhancement in printing material saving mode
US20190228277A1 (en) System for producing information code and method of processing information
CN114872454B (en) Information processing apparatus, control method for information processing apparatus, and computer-readable recording medium
US20220301326A1 (en) Ocr target area position acquisition system, computer-readable non-transitory recording medium storing ocr target area position acquisition program, hard copy, hard copy generation system, and computer-readable non-transitory recording medium storing hard copy generation program
US20170180581A1 (en) Information processing apparatus, image reading apparatus, information processing method, and non- transitory computer readable medium
JP5805424B2 (en) Document reader
CN116700637B (en) Catalyst product two-dimensional code printing method and device and electronic equipment
US7079285B2 (en) Efficient rasterizing sub-system for printers
KR100678890B1 (en) Method and apparatus for direct printing
CN101138914A (en) Image forming apparatus and image forming method capable of printing images without spaces therebetween
CN117434805A (en) Image forming apparatus, control method for controlling image forming apparatus, and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant