Information processing device, control method thereof, and program
The use of JavaScript and WebAssembly on an information processing device allows users to dynamically customize print data generation, addressing the challenge of user-inaccessible print applications and drivers, ensuring security and speed in generating personalized print data.
Patent Information
- Application Number
- JP2021189621
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2021-11-22
- Publication Date
- 2025-08-28
- Estimated Expiration
- 2041-11-22
AI Technical Summary
Customizing the print data generation process is difficult due to the inability of users to change print applications, firmware, or print drivers, which are pre-built and not designed for user modification, leading to a significant burden on printer vendors to provide individual customization.
An information processing device uses JavaScript and WebAssembly to dynamically change the print data generation process by acquiring and modifying logic from a printer or server, allowing users to configure and execute print data generation processes on the device side.
This approach enables dynamic customization of print data generation while maintaining security and processing speed, allowing users to create personalized printed materials and enhancing printer vendor competitiveness.
Smart Images

Figure 0007730731000001 
Figure 0007730731000002 
Figure 0007730731000003
Abstract
Description
[Technical Field]
[0001] The present invention relates to an information processing device, a control method thereof, and a program. [Background technology]
[0002] In recent years, the rate of personal smartphone ownership has increased, and it has become common for printer vendors to provide smartphone printing apps to users. Using such printing apps, users can send image data such as JPEG from their smartphones to printers, and the printers can generate print data from the received image data and print it.
[0003] The print data generation process for such printers involves many processes, such as image data decoding, color space conversion, ink color separation, and quantization. Each printer is individually optimized for its own unique characteristics, such as the number of inks used, ink characteristics, and internal calculation accuracy. These controls are performed by the printer's firmware, and the print data generation process is also performed using an application-specific integrated circuit (ASIC). Using an ASIC in this way enables high-speed processing at low cost.
[0004] In addition to the ASIC processing mentioned above, print data can also be generated using a print driver on the host side. Print drivers are primarily used on PCs and offer many advantages over print apps, such as spooling and the ability to specify detailed print settings.
[0005] The print data generation process using the above-mentioned print application and print driver has traditionally been provided by each printer vendor, but there is a strong demand for individual customization of the print data generation process. If the print data generation process could be customized, users would be able to create printed materials according to their preferences, and for printing vendors that handle printed materials commercially, customization is expected to lead to the originality of their products and ultimately to their competitiveness. [Prior art documents] [Patent documents]
[0006] [Patent Document 1] Japanese Patent Application Publication No. 2019-211849 Summary of the Invention [Problem to be solved by the invention]
[0007] Customizing the print data generation process described above requires changing the print application, firmware (FW) / ASIC, or print driver. Print applications and print drivers are configured to use pre-built programs and are not the type of thing that users can change. Furthermore, the firmware and ASIC are not designed to be rewritten by users, making it difficult for users to change them locally. Therefore, customization of the print data generation process must be done by the printer vendor, but it is unrealistic for printer vendors to customize for each user, as this would be a significant burden.
[0008] One possible solution to this problem is to configure the host device to dynamically change the print data generation process.
[0009] Scripting languages such as JavaScript (registered trademark) are suitable for dynamically changing the print data generation process as described above. However, the logic of scripting languages is more easily analyzed than pre-compiled programs, and providing logic in scripting languages is undesirable from the perspectives of technology protection and security. Furthermore, scripting languages require interpretation processing by an interpreter at runtime, resulting in slower processing speeds than pre-compiled programs. For this reason, web applications often use a method that combines processing on the host device and processing on the server.
[0010] An object of the present invention is to solve at least one of the problems of the prior art.
[0011] The object of the present invention is to provide a technology that enables the generation of print data to be printed by a printer to be dynamically changed on the information processing device side, and that enables the generation of print data in a state that allows the original print data generation process to be used in combination. [Means for solving the problem]
[0012] In order to achieve the above object, an information processing device according to one aspect of the present invention has the following configuration: Written in JavaScript The first program, Written in WebAssembly an information processing apparatus that generates print data using a second program, Generate print data A generating process is a process to be executed in a printer external to the information processing device, and the generating process is executed in the information processing device. First generation logic The second program written Acquisition means for acquiring; The acquired second program describes a modification means for generating second generation logic in which at least a part of the first generation logic is modified; Using the input image data and the second generation logic Tips generating means for generating print data to be printed by a printer; a transmission means for transmitting the print data generated by the generation means to the printer; the first generating logic is configurable and associated with the printer; By changing at least a part of the first generation logic, the content of the generation process executed in the information processing device is changed; The first generation logic is characterized by being executed using the second program. [Effects of the Invention]
[0013] According to the present invention, it is possible to suppress concerns about scripting languages, while dynamically changing the generation of print data to be printed by a printer on the information processing device side, and to generate print data in a state in which the original print data generation process can also be used in combination.
[0014] Other features and advantages of the present invention will become apparent from the following description taken in conjunction with the accompanying drawings, in which the same or similar elements are designated by the same reference numerals. [Brief explanation of the drawings]
[0015] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate embodiments of the invention and, together with the description, serve to explain the principles of the invention. [Figure 1] 1 is a block diagram showing a hardware configuration of an information processing apparatus according to an embodiment of the present invention and an example of connection with an external device; [Figure 2] FIG. 2 is a block diagram illustrating the functional configuration of a printer according to the embodiment. [Figure 3] 6 is a flowchart illustrating a process in which an information processing apparatus according to an embodiment generates print data and transmits it to a printer. [Figure 4] 5A and 5B are diagrams illustrating an example in which the information processing apparatus according to the embodiment acquires data from a printer or a server. [Figure 5] 5A shows an example of a main flow screen displayed in the UI display of S302, and FIG. 5B shows an example of a preprocessing editing screen displayed when the preprocessing block in FIG. 5A is clicked. [Figure 6] FIG. 4 is a diagram illustrating a processing flow from generating print data to transmitting print data in the information processing apparatus according to the embodiment. [Figure 7] 5A and 5B are diagrams for explaining image data and the number of bits to be handled in the embodiment. [Figure 8] FIG. 10 is a diagram illustrating data compression of cyan (C) data by bit shifting. [Figure 9] 5A and 5B are diagrams for explaining the data format of print data transmitted from the information processing apparatus to a printer according to the embodiment; [Figure 10] 10A and 10B are diagrams illustrating other data formats of print data transmitted from the information processing apparatus to the printer according to the embodiment. DETAILED DESCRIPTION OF THE INVENTION
[0016] Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings. Note that the following embodiments do not limit the scope of the invention claimed. Although multiple features are described in the embodiments, not all of these multiple features are necessarily essential to the invention, and multiple features may be combined arbitrarily. Furthermore, in the accompanying drawings, the same reference numerals are used to designate the same or similar components, and redundant explanations will be omitted.
[0017] FIG. 1 is a block diagram showing an example of the hardware configuration of an information processing apparatus 100 according to an embodiment of the present invention and a connection example with an external device.
[0018] The information processing device 100 has a CPU (Central Processing Unit / Processor) 101, a GPU (Graphics Processing Unit) 102, a RAM 104, a ROM 104, a secondary storage device 105, and external I / Fs 106 to 108. The information processing device 100 is connected to the Internet 110 via the external I / F 106, and is also connected to a printer 114 via the external I / F 108. Servers 111 to 113 are also connected to the Internet 110.
[0019] The CPU 101 executes various processes described below according to a program. While FIG. 1 shows a single CPU 101, the CPU 101 may be configured with multiple CPUs or CPU cores. The GPU 102 is a computing device capable of parallel processing a large number of calculations. The GPU 102 is generally good at calculations required for 3D graphics and image rendering, but in recent years has also been applied to machine learning. The RAM 103 has an area for loading programs stored in the ROM 104 or secondary storage device 105 when the CPU 100 executes a program, and also functions as a work memory for temporarily storing various information. The ROM 104 stores programs that the CPU 101 loads into the RAM 103 and executes. The secondary storage device 105 is a storage device, such as a hard disk or flash memory, and stores various programs, data such as databases that hold files and processing results such as image analysis. The external I / Fs (interfaces) 106-108 are interfaces having at least one of wired and wireless communication modes, and communicate with external devices (printers 114 or servers 111-113) depending on the communication mode used. Examples of wired communication include USB and Ethernet (registered trademark), while examples of wireless communication include wireless LAN, NFC, Bluetooth (registered trademark), and infrared communication. When wireless LAN is used for wireless communication, devices may be directly connected to each other or may be connected via a relay device such as a wireless LAN router. For example, if the information processing device 100 is a device without a display function or input mechanism, such as a desktop PC, a keyboard, a display, a pointing device, and the like may be connected to the external I / F 107 and used. Intercommunication between various components within the information processing device 100 is performed via a control bus / data bus 109.
[0020] The printer 114 is a printing device, and transmits and receives data to and from the information processing device 100 via an external I / F 108 of the information processing device 100. The information processing device 100 is also connected to the Internet 110 via an external I / F 106.
[0021] FIG. 2 is a block diagram illustrating the functional configuration of the printer 114 according to the embodiment.
[0022] The printer 114 in this embodiment has, broadly speaking, functions of a recording device 201 and an image processing device 202. Image data supplied from the information processing device 100 undergoes predetermined image processing in the image processing device 202, and is then sent to the recording device 201 and recorded (printed).
[0023] In the printing device 201, the main control unit 203 controls the entire printing device 201 and includes a CPU, ROM, RAM, etc. The print buffer 204 stores image data as raster data before transferring it to the print head 205. The print head 205 is an inkjet print head with multiple print elements capable of ejecting ink droplets, and each print element ejects ink according to the image data stored in the print buffer 204. Four print element arrays for cyan (C), magenta (M), yellow (Y), and black (K) are arranged on the print head 205, but the number of colors is not limited to this. For example, in addition to the four colors, print elements for light cyan, light magenta, gray, etc. may also be installed. Print elements for red, green, blue, and fluorescent ink may also be installed as special color inks. Print elements for silver ink, embossed ink, clear ink, and other inks with functions other than color may also be installed. Furthermore, the print head 205 may be configured with only black print elements.
[0024] If the amount of data stored in the print buffer 204 is insufficient for the amount of data processed by the print head 205, the print head operation will stop, causing unevenness. To prevent this, the speed at which raster data is stored in the print buffer 204 must be faster than the speed at which the print head 205 records based on the data. Another solution is to start printing only after accumulating raster data to the point where the data will not run out in the print buffer 204 by the time printing ends.
[0025] The paper feed / discharge motor control unit 206 controls the transport and feeding / discharging of recording media such as sheets and paper, and controls the paper position so that ink ejected from the recording head 205 hits an accurate position on the paper surface. Taking into consideration the case where the recording head 205 has a multi-pass configuration, the start / stop operation of the transport motor is also performed.
[0026] The recording device I / F 207 exchanges data signals with the image processing device 202. An I / F signal line 217 connects the two. The I / F signal line 217 can be of any type, such as one conforming to Centronics specifications. A data buffer 208 temporarily stores image data received from the image processing device 202. An operation unit 209 has a mechanism for allowing developers to operate commands. A system bus 210 connects the various functional units of the recording device 201.
[0027] Next, the image processing device 202 will be described.
[0028] The main control unit 211 of the image processing device generates print data recordable by the recording device 201 based on image data supplied from the external I / F 216, and is equipped with a CPU, ROM, RAM, etc. The main control unit 211 also returns data corresponding to requests from the external I / F. Lookup tables and matrices, for example, necessary for generating image data used in the image processing device 202, are pre-stored in the ROM of the main control unit 211 of the image processing device. The image processing device I / F 212 exchanges data signals with the recording device 201. The external I / F 216 exchanges image data and other data with an information processing device such as a host device. The display unit 213 displays various information to the user and may be, for example, an LCD display. The operation unit 214 is a mechanism for the user to enter commands and includes, for example, a keyboard and a pointing device. A system bus 215 connects the main control unit 211 to each functional unit.
[0029] The image processing unit 219 performs image processing. Image data input via the external I / F 216 includes image data that cannot be recorded by the recording device 201, such as JPEG and PNG. The image processing unit 219 performs decoding and CMYK conversion on this data to generate print data that can be recorded by the recording device 201. The print data generated in this manner is sent to the recording device 201 via the image processing device I / F 212.
[0030] The information processing device 100 according to the embodiment will be described below.
[0031] 3 is a flowchart illustrating a process in which the information processing device 100 according to the embodiment generates print data and transmits it to the printer 114. The process shown in this flowchart is achieved by the CPU 101 executing a program loaded in the RAM 103.
[0032] First, in step S301, the CPU 101 acquires changeable logic. This logic is acquired by using the browser 401 (FIG. 4) installed in the information processing apparatus 100 from the printer 114 connected via the external I / F 108 using the HTTP protocol.
[0033] FIG. 4 is a diagram illustrating an example in which the information processing apparatus 100 according to the embodiment acquires data from the printer 114 or the server.
[0034] The browser 401 and dedicated software 402 are executed on the information processing device 100. In response to a query from the browser 401, the printer 114 returns an HTML file, a JavaScript file, and a WASM (WebAssembly) file. The HTML file contains a description of the UI of the application and is used together with the JavaScript to build the UI. The JavaScript file is a program written in a scripting language called JavaScript. The JavaScript file contains logic for dynamically modifying the file, and this logic enables partial processing changes. The acquired JavaScript file is assumed to be uncompiled. When the JavaScript file is executed, it is assumed to be compiled in the information processing device 100. In other words, the logic created by JavaScript is compiled when the application is executed in the information processing device 100 and executed by the CPU 101. Note that typical browsers, including the browser 401, are equipped with a JavaScript engine, and JavaScript is dynamically compiled by this JavaScript engine at execution time. The WASM file is the logic for generating print data executed within the printer 114. Executing this WASM file causes the browser 401 to execute print data generation processing equivalent to the processing within the printer 114. Furthermore, in the present invention, a WASM file is a program that is pre-compiled before being acquired by the information processing device 100. Specifically, the printer 114 has a pre-compiled WASM file, and the information processing device 100 acquires the WASM file. Note that the WASM file held by the printer 114 may be a file compiled by the printer 114, or a file compiled by an external server. In the present invention, a WASM file is an instruction set written in WebAssembly. Note that a WASM file can be used from a JavaScript file.
[0035] The communication process in the printer 114 is controlled by the main control unit 211 of the image processing device. In this embodiment, the files returned from the printer 114 to the information processing device 100 are HTML files, JavaScript files, and WASM files, but are not limited to these. The communication protocol may be any that can be used by the browser 401, and is not limited to HTTP communication. For example, https may be used to increase communication security, or WebSocket may be used to increase communication speed.
[0036] In the embodiment, the browser 401 makes an inquiry to the printer 114 and acquires a file describing the generation logic of the print data associated with that printer 114, but the acquisition of the file is not limited to this. For example, the data may be received from the servers 111 to 113, or the client software that issues the file request may be the dedicated software 402. Receiving data from the servers 111 to 113 has the advantage that the print data generation process can be changed even if the printer itself is not at hand.
[0037] When using the dedicated software 402, the client software can be written in native language, making it possible to use any communication protocol that a browser cannot use. Additionally, by storing a file acquired through a single communication in the storage area 403 (secondary storage device 105), subsequent changes to the print data generation process can be made without communicating with the server. Furthermore, the process after changing the logic can be saved as a custom file 406 and reused. When using the dedicated software 402, all that's needed is to run the internal local server 404 and have it read the file from the storage area 403. The web engine 405 interprets JavaScript and executes the process. Having the web engine 405, like the dedicated software 402, also has the advantage of not being affected by version changes in the browser 401.
[0038] Next, the process proceeds to S302, and the CPU 101 displays the UI. This UI may be displayed on an external display connected via the external I / F 106 or the like, or, in the case of a smartphone, for example, it may be displayed on a touch panel display mounted on the smartphone.
[0039] FIG. 5A is a diagram showing an example of a main flow screen displayed in the UI display of S302.
[0040] The UI display according to the embodiment displays this main flow screen 500. This main flow screen 500 displays blocks 501 to 506 showing the flow of the print data generation process and each item, and finally an execute button 507 that instructs printing execution. The user can select any item from the main flow screen 500 to change the print data generation process.
[0041] Next, the process proceeds to S303, and upon receiving an instruction from the user to change the print data generation process, CPU 101 changes the logic of the print data generation process in accordance with the user's instruction. UI blocks 501-506 correspond to print data generation processes 602-606 in Fig. 6, respectively, and hereinafter, print data generation processes including 607-608 will be referred to as "processing blocks." Note that the print data generation process is not limited to print data generation processes 602-606.
[0042] 6 is a diagram illustrating the flow of processing from generating print data to transmitting print data in the information processing apparatus 100 according to the embodiment. Print data generation processing blocks 602 to 606 correspond to blocks 501 to 506 in FIG.
[0043] Hereinafter, the entire system operating on the host device, including the print data generation processing blocks 602-608 and the UI, will be referred to as the "print data generation framework" 600. Here, the processing blocks 610 (602-606) are processing blocks that are presented to the user via the UI and allow the user to give instructions such as changes. The processing blocks 611 (607-608) are processing blocks that are not presented to the user and are processed by the print data generation framework 600. The processing of the processing blocks 611 is also provided by the printer 114 using WASM, and each processing may be consolidated into a single WASM file or provided as multiple WASM files. In other words, as long as pre-compiled, usable logic is provided, any form of provision is acceptable.
[0044] First, an input image 601 is input image data that is the target of the print data generation process. The input image 601 is acquired by the user clicking on the input image selection block 501 on the main flow screen 500 in FIG. 5(A). In the case of HTML, the image data is acquired as follows: <input> Using tags, image data can be obtained from a file on the host device. Alternatively, it is possible to obtain an image file from an external source via the Internet 110 using the fetch function of JavaScript, etc. The image data selected and input in this way by the input image selection block 501 is decoded and expanded into 24-bit data (8 bits each for RGB) before being input to the data analysis 602, and is held in the following format. let image = { width: Image width height: The height of the image channels: 3 / / 3 channels of RGB depth: 8 / / Calculation precision. 16 for 16bit data: image data colorSpace: “AdobeRGB” } Data analysis 602 is the first place where image data is passed in the print data generation process, and analyzes the image data.
[0045] Inkjet printers do not use a method of mixing CMY (cyan, magenta, and yellow) inks to print black areas. While mixing CMY inks theoretically produces black, it is technically difficult to reproduce and consumes a large amount of ink (three colors), making it more rational to use black ink (K). Therefore, black (K) ink is generally used for black areas. The black area referred to here refers to the text area of a document, for example. However, some documents contain only black text, while others contain graphics. In such documents, properly separating the areas printed with CMY ink from the areas printed with K ink leads to improved image quality and reduced ink (printing material) consumption. The data analysis 602 performs this region separation, analyzing the text and non-text areas in the image and saving the analysis results as data. The data can be stored in RAM 103, or, if a dedicated application is used, can be saved in secondary storage device 105. After data analysis 602 is executed, an error check 620 is performed. If no error is detected, the process proceeds to pre-processing 603.
[0046] Preprocessing 603 changes data input in RGB and outputs it as RGB data. For example, if the user wants to change preprocessing 603, the user clicks on preprocessing block 503 on the main flow screen 500. When preprocessing block 503 is clicked, a preprocessing edit screen 510 shown in Fig. 5(B) is displayed.
[0047] FIG. 5(B) is a diagram showing an example of a preprocessing editing screen 510 that is displayed when the preprocessing block 503 in FIG. 5(A) is clicked.
[0048] On this pre-processing edit screen 510, one of three types of print data generation processing can be selected and specified by clicking on either a preset button 511, a direct edit button 512, or a file selection button 513.
[0049] The preset button 511 allows a process to be selected from a plurality of preset processes, and these preset processes are acquired at the timing of accessing the printer 114 in the above-mentioned step S301. An example of pre-processing is color space conversion.
[0050] Generally, digital image data consists of RGB pixels, each expressed in 8 bits. In this case, the minimum value is 0 and the maximum value is 255. For example, (R,G,B)=(0,0,0) indicates black, and (R,G,B)=(0,255,0) indicates green. 255 is the maximum value of 8 bits, so for example, (R,G,B)=(0,255,0) indicates the maximum output of green.
[0051] However, there are many different types of monitors that display image data, each with different color rendering capabilities. Suppose Display A has a high ability to render green, and Display B has a low ability to render green. When (R, G, B) = (0, 255, 0) is displayed, the digital data is the same, but the color does not appear the same to the human eye. Specifically, this applies when Display A is an AdobeRGB monitor and Display B is an sRGB monitor. Simply making the 8-bit data for each RGB color identical does not result in the same color being displayed across displays. Color spaces and color space conversion processes address this discrepancy. A color space indicates the range of colors that can be rendered (color gamut), and examples include sRGB, AdobeRGB, and DisplayP3. By combining this color space with RGB data and saving it as image data, it is possible to achieve colors that appear the same across displays. This conversion process is called color space conversion.
[0052] When selecting a process from multiple presets, it is assumed that preset processes include, for example, color space conversion from sRGB to the printer color space (DeviceRGB), color space conversion from AdobeRGB to the printer color space, etc. The preset processes may also include, for example, a process to brighten luminance, edge enhancement, smoothing, etc., and are not limited to the above-mentioned color space conversions, and may also be configured to allow multiple selections of these.
[0053] The direct edit button 512 allows a program to be written directly in JavaScript. When the direct edit button 512 is pressed, an edit area 514 is displayed as shown in FIG. 5(B). The user can implement the processing they wish to execute via this edit area 514. Because JavaScript dynamically compiles processing, it is possible to configure the processing to be overwritten later, as in the embodiment.
[0054] The editing area 514 displays the data to be input to the preprocessing 603, an explanation of each piece of data, and the data to be output, and the user writes a program based on this information. When changing the preprocessing 603, there are cases where the entire preprocessing is replaced, and there are also cases where it is desirable to add a new process to the original preprocessing. To accommodate such situations, a means for executing a WASM file related to the preprocessing 603 obtained from the printer 114 is also provided. Changing the process does not only involve changing or adding a process as described above, but also includes skipping a process altogether.
[0055] Editing using the direct edit button 512 allows you to write in JavaScript and utilize functions that can use JavaScript. For example, using an API such as WebGL enables processing on a GPU, which is expected to speed up the process of generating print data after changes are made.
[0056] When the file selection button 513 is pressed, the print data generation process can be changed by loading an external file. The file to be loaded must be written according to specific rules, and the processing logic can be loaded based on these rules. For example, one specific rule would be to prepare an overwrite function for overwriting processing blocks in the print data generation framework 600, and to require that the external file always call this overwrite function. Naturally, the specific rules are not limited to these.
[0057] In this way, by being able to read an external file that defines the processing logic and change the print data generation process, it is possible to improve convenience by reusing a process that has already been generated or by using a file prepared by a third party. Furthermore, an external file may be generated by editing using the direct edit button 512 and then exporting it by pressing the export button 515. Because the browser 401 can use WASM, external files may be loaded by loading JavaScript and WASM and using the loaded WASM. C / C++ and RUST, which are programming languages that can generate WASM, allow for the description of parallel processing, and using this can be expected to increase speed through parallel processing.
[0058] The above is the conversion method of the pre-processing 603 according to this embodiment. Here, it is assumed that 8-bit RGB data input in the pre-processing is expanded to 10-bit RGB data. Furthermore, it is assumed that the user, through editing using the direct editing button 512, converts the AdobeRGB color space to DeviceRGB, the color space of the printer 114, through a proprietary process, and simultaneously expands the data from 8 bits to 10 bits. The reason for increasing the number of bits in the image data here is to improve calculation accuracy; in actual printers, calculations are often performed with a precision of 8 bits or more. The method for increasing the number of bits may be to set a fixed bit precision as described above, or, since this is printer-specific information, it may be determined by inquiring about the internal calculation precision of the printer 114. Increasing the calculation precision from 8 bits to 10 bits in this way allows the user to handle pixel values in the range of 0 to 1023 rather than the range of 0 to 255. According to the above image format, the image data passed from the pre-processing 603 to the post-processing 604 has the following format: image = { width: Image width height: The height of the image channels: 3 depth: 10 / / 10-bit precision data: Image data / / Uint16Array colorSpace: “DeviceRGB” } Here, when image data is passed from pre-processing 603 to post-processing 604, the print data generation framework 600 performs a pre-processing error check 621. In this embodiment, 10-bit image data is passed to post-processing 604, but data with more bits than this is unexpected by the print data generation framework 600. Therefore, the error check 621 checks whether the image data passed from pre-processing 603 to post-processing 604 is compatible with 10 bits or less. Here, the data type of the image format is defined as a 16-bit type (Uint16Array).
[0059] FIG. 7 is a diagram illustrating image data and the number of bits to be handled in this embodiment.
[0060] In FIG. 7, R 701, G 702, and B 703 of one pixel 704 each hold an area 705 capable of handling 16 bits (2 bytes). In this embodiment, the 6 bits indicated by reference numeral 706 are not used. The values that 10-bit data can take are 0 to 1023, with the maximum value being 1023. However, in this embodiment, JavaScript processes data in a 16-bit format, so values of 1024 or more can actually be entered. In light of this, the role of error check 621 is to check whether the image data passed from pre-processing 603 contains a value exceeding 1023. Other possible error checks include checking that the image format has channels set to 3, depth set to 10, and color space set to DeviceRGB.
[0061] In this way, by checking not only the image data values but also the contents of the image format, the user can be made aware of the output in each processing block intended by the print data generation framework 600. If an error is detected in any of the error checks 620 to 624 in Fig. 6, the notification may be made by throwing an error using a JavaScript function and displaying the error in a log, or by displaying an error dialog in the UI.
[0062] In the embodiment, a JavaScript Uint16Array is used as an example, but the present invention is not limited to this and negative values or decimal values may also be used, in which case the value range is checked accordingly.
[0063] 6 can also be changed by the user, similar to the pre-processing 603. After the pre-processing 603, the logic is assumed not to be changed by the user, and the explanation of each processing block will continue.
[0064] The post-processing 604 is a processing block that converts RGB data into CMYK data. Image data is handled in RGB on PCs, smartphones, and the like. These screens have the ability to emit light, so colors are expressed using additive RGB color mixing. In contrast, printed materials from printers do not emit light, so colors are expressed using subtractive color mixing. Subtractive color mixing requires CMY data to express colors. The printer 114 adds black (K) ink to these CMY inks and prints in CMYK. In other words, the data ultimately required for printing is data related to CMYK, so the RGB data must be converted to CMYK data at some point. In this embodiment, this is performed in the post-processing 604. For example, the following formula is an example of a formula for converting RGB data to CMYK data: K = 1023 - max(R, G, B); C = (1023 - R - K) / (1023 - K); M = (1023 - G - K) / (1023 - K); Y = (1023 - B - K) / (1023 - K); Here, max is a function that obtains the maximum value from the given arguments.
[0065] However, the above-mentioned process is not actually used because the printed colors vary greatly not only depending on the CMYK data, but also on the characteristics of the ink installed in the printer 114, the mechanical accuracy of the printer 114 itself, and the location where the ink is applied by halftoning. Therefore, the process of converting RGB data to CMYK data in the post-processing 604 is a part that each printer vendor creates independently.
[0066] However, even here, there is room for user customization. For example, the post-processing 604 can execute processing based on the generation logic of the changeable print data obtained from the printer 114 to convert it to CMYK data, and then halve the amount of CMYK data. Halving the CMYK data simply reduces the amount of ink ejected, which is suitable for users who want to reduce ink consumption, even if it is a lighter amount. Also, for example, if an inquiry to the printer 114 shows that the remaining amount of C ink is low, the amount of C data in the CMYK data can be reduced to postpone the running out of cyan ink.
[0067] In all-in-one ink cartridges, where the ink and print head are integrated, each cartridge contains CMY ink, and the cartridge must be replaced when one of the colors runs out. Customizing the CMY data values can be expected to equalize ink usage and extend the cartridge replacement cycle.
[0068] Here, the image format passed from the post-processing 604 to the gamma correction 605 is as follows: image = { width: Image width height: The height of the image channels: 4 / / CMYK depth: 10 / / 10-bit precision. data: Image data / / Uint16Array colorSpace: “DeviceCMYK” } In the gamma correction 605, gamma correction is performed on the CMYK data.
[0069] The data is converted to CMYK data in the post-processing step 604, and a value between 0 and 1023 is stored for each. Here, 0 represents no ink being ejected, while 1023 represents maximum ink ejection. Even if the amount of ink ejected is controlled according to the values between 0 and 1023, the color density does not necessarily increase in proportion to the amount of ink ejected. If ink is ejected onto a blank piece of white paper, you can see that the color gradually becomes darker, but once the color becomes saturated to a certain extent, the degree of darkness decreases even with the same amount of ink ejected. This is due to various factors, such as human visual characteristics, ink characteristics, and the printer's DPI (Dots Per Inch), and the gamma correction step 605 adjusts the color taking these factors into account. For example, the CMYK data is changed as shown below.
[0070] γ = 2.2; C = 1023 * pow(1.0 - (C / 1023), γ); M = 1023 * pow(1.0 - (M / 1023), γ); Y = 1023 * pow(1.0 - (Y / 1023), γ); K = 1023 * pow(1.0 - (K / 1023), γ); Here, pow(a,b) is a function that raises a to the power b.
[0071] Users who have changed the post-processing 604 can generate CMYK data that takes into account human visual characteristics better by also editing the gamma correction 605. Furthermore, gamma correction is generally used to emphasize dark and light areas of an image, and the gamma correction 605 can also be used for such purposes.
[0072] Up until the gamma correction 604 step, CMYK data was managed as digital data using values between 0 and 1023. However, when actually printing using the printer 114, only two options are available: "ink" and "no ink." While some printers offer variations such as "little ink" and "more ink," these options are still significantly fewer than the 1024 levels represented by digital data. Therefore, printers express shading by creating variations in density between "inked" and "non-inked" areas in extremely small areas imperceptible to the human eye. Halftoning 606 digitally generates these "inked" and "non-inked" areas. In this embodiment, only two values, "inked" and "no ink," are used. Halftoning is a widely known technique, and includes methods such as dithering and error diffusion.
[0073] One problem with halftoning is "thin line processing," and by changing Halftoning 606, users can specify their own thin line processing. Thin lines are thin lines that often appear when printing architectural blueprints. Halftoning 606 divides the area into "printed" and "unprinted" areas, so if the middle of a thin line is determined to be "unprinted," the line will be missing. To prevent this, if there is a thin line, it must be adjusted so that it is not broken in the middle.
[0074] Here, the print data generation framework 600 analyzes the input image 601 in data analysis 602, and the results are stored in RAM 103. It is also assumed that thin lines have been detected in the data analysis 602. Thin lines can be detected using a technique such as edge detection, for example. If edges are detected as described above, the determination can be rewritten to "hit" so that there are no breaks in the edge portions along the way.
[0075] In this way, the analysis results of the data analysis 602 can be connected to a subsequent processing block, and naturally, the processing that can use the analysis results is not limited to halftoning processing.
[0076] As described above, the user changes any process in blocks 501 to 506 on the main flow screen 500, and then presses the execute button 507. This starts the print data generation process of S304 in Fig. 3. In this way, the print data generation framework 600 generates print data. Next, processing blocks 607 and 608 of the processing block group 611 executed by the print data generation framework 600 will be described.
[0077] The results generated by Halftoning 606 are binary information of "print" or "not print" for each CMYK data, and are in the following image format. image = { width: Image width height: The height of the image channels: 4 / / CMYK depth: 1 / / 1 bit for "hit" or "don't hit" data: Image data / / uint8Array() colorSpace: “none” } Here, data is compressed. Up until now, a 16-bit area was allocated and processing was performed with 10-bit calculation precision, but after halftoning 606, the information can be expressed in 1 bit.
[0078] FIG. 8 is a diagram illustrating data compression of cyan (C) data by bit shifting.
[0079] In the figure, 801 shows data after halftoning where the x and y coordinates of cyan are (0,0). Similarly, 802 shows data after halftoning where the x and y coordinates of cyan are (15,0). These data can be represented in 1 bit, as shown by reference number 803, so using a 16-bit area would be a waste of resources. In this way, data is compressed by packing and regenerating it.
[0080] Image data also has the characteristic that neighboring pixels often have similar pixel values. In other words, the same values often occur repeatedly, so further data compression can be achieved by combining the above compression with compression algorithms such as run-length compression and Huffman coding. Reference number 804 indicates the result of "shift compression," which involves bit reduction using a shift operation. Note that the above compression process is performed after separating the image format into CMYK, and the following compressed images are sent to endian processing 608. imageC = { width: Image width height: The height of the image channels: 1 / / C depth: 1 / / 1 bit. data: Image data / / uint16Array() colorSpace: “none” } imageM = { width: Image width height: The height of the image channels: 1 / / M depth: 1 / / 1 bit. data: Image data / / uint16Array() colorSpace: “none” } imageY = { width: Image width height: The height of the image channels: 1 / / Y depth: 1 / / 1 bit. data: Image data / / uint16Array() colorSpace: “none” } imageK = { width: Image width height: The height of the image channels: 1 / / K depth: 1 / / 1 bit. data: Image data / / uint16Array() colorSpace: “none” } In the endian processing 608, endian refers to the order of data when viewed in 8-bit (1 byte) units, and there are big endian, little endian, etc. The method used differs depending on the CPU, and if the endian is different, the byte order must be changed to maintain data consistency. This is done by the endian processing 608.
[0081] The information required for the endian processing 608 is the endian system of the information processing device 100 and the endian system of the printer 114 to which the print data is to be sent. Therefore, the information processing device 100 queries the printer 114 for information regarding the endian system. If the received endian system differs from the endian system of the information processing device 100, the endian processing 608 is performed. However, if the endian systems are the same, the endian processing 608 may be skipped.
[0082] 3, once the print data is generated in S304, the process proceeds to S305, where the print data is sent to the printer 114. This corresponds to the print data sending 609 in FIG.
[0083] In the embodiment, the information processing device 100 requests printer-specific information from the printer 114, but the type of request is included in the transmitted data, allowing the printer 114 to respond correctly. In this embodiment, the print start instruction to the printer 114 uses the POST method of HTTP communication, and the actual print data uses the data format 900, allowing the printer 114 to start printing.
[0084] FIG. 9 is a diagram illustrating the data format of print data sent from the information processing apparatus 100 to the printer 114 according to the embodiment.
[0085] Here, reference numeral 901 indicates an address in the data format, and reference numeral 902 indicates the number of bytes stored at address 901. Reference numeral 903 indicates the type of compression. Here, "shift compression" refers to a process of packing bits by a shift operation as shown by reference numeral 804 in FIG. 8.
[0086] The printer 114 starts printing when the first value of the data entity sent by the POST method of HTTP communication is "0xa".
[0087] In actual operation, it is preferable that the information processing device 100 inquires of the printer 114 whether it is in a state where it can print, and transmits data if it is. If the printer 114 is currently printing something and cannot accept new data, the UI notifies the user of this. Alternatively, the information processing device 100 may hold the data in the RAM 103 or the secondary storage device 105 until the printer 114 is in a state where it can accept data, and automatically start transmitting the data when it becomes able to accept the data.
[0088] Furthermore, the data format 900 holds CMYK data for each plane as indicated by reference numbers 906 to 909, but may hold CMYK data for each line.
[0089] FIG. 10 is a diagram illustrating another data format of print data transmitted from the information processing apparatus 100 to the printer 114 according to the embodiment.
[0090] Here, the data format when data is transmitted line by line from the information processing device 100 to the printer 114 is shown.
[0091] The format 910, which can send data line by line, has the advantage that the printer 114 can start printing without waiting for all data to be received. Also, the buffer capacity required to store data in the printer 114 can be reduced, which is expected to reduce the cost of the printer.
[0092] The operation of the information processing device 100 has been described above.
[0093] After the information processing device 100 transmits data to the printer 114, the printer 114 receives the data via the external I / F 216 at the main control unit 211 of the image processing device. If the received data can be directly transmitted to the recording device 201 for printing, the data is transmitted to the recording device 201 via the image processing device I / F 212 without undergoing image processing in the image processing unit 219. If some processing, such as data decoding, is required, the image processing unit 219 performs image processing before transmitting the processed data to the recording device 201.
[0094] In addition to modifying the processing logic, the print data generation framework 600 also provides memory allocation and memory release methods. Programs typically allocate and use memory dynamically, using functions like malloc in C, in addition to areas allocated in advance. The print data generation framework 600 also allocates and releases memory dynamically during program execution, but when using WASM to allocate memory, that memory release is required.
[0095] In JavaScript, memory release is not necessary because garbage collection is implemented, but in WASM, memory release must be done manually. However, users familiar with JavaScript are rarely aware of memory release, so it is easy to imagine that they may forget to release memory, which can cause unexpected bugs. Therefore, the print data generation framework 600 needs to provide a means to ensure memory allocation and memory release.
[0096] The print data generation framework 600 releases memory on behalf of the user if memory has been allocated but not released after the print transmission data transmission 609. The memory allocation and memory release methods are used, for example, in situations where the user also writes logic using WASM and executes it from JavaScript.
[0097] As described above, according to the embodiment, it is possible to generate print data by changing at least a part of the print data generation logic that generates print data associated with a printer that executes printing to specifications intended by the user. In this way, while minimizing concerns about scripting languages, it is possible to dynamically change the generation of print data to be printed by a printer on the information processing device side, and to generate print data in a state in which the original print data generation process can also be used.
[0098] (Other embodiments) The present invention can also be realized by supplying a program that realizes one or more functions of the above-described embodiments to a system or device via a network or a storage medium, and having one or more processors in the computer of the system or device read and execute the program. It can also be realized by a circuit (e.g., ASIC) that realizes one or more functions.
[0099] The present invention is not limited to the above-described embodiments, and various modifications and variations can be made without departing from the spirit and scope of the present invention. Therefore, the following claims are appended to apprise the public of the scope of the present invention. [Explanation of symbols]
[0100] 100...information processing device, 101...CPU, 103...RAM, 104...ROM, 114...printer, 201...recording device, 202...image processing device, 203...main control unit of recording device, 204...recording buffer, 205...recording head, 211...main control unit of image processing device, 219...image processing unit
Claims
1. An information processing device that generates print data using a first program written in JavaScript and a second program written in WebAssembly, an acquisition means for acquiring the second program describing first generation logic for executing, in the information processing device, a generation process that generates print data and is executed in a printer external to the information processing device; a modification means for modifying at least a part of the first generation logic described by the acquired second program to generate second generation logic; a generating means for generating print data to be printed by a printer using input image data and the second generating logic; a transmission means for transmitting the print data generated by the generation means to the printer; the first generating logic is configurable and associated with the printer; By changing at least a part of the first generation logic, the content of the generation process executed in the information processing device is changed; The information processing device is characterized in that the first generation logic is executed using the second program.
2. 2. The information processing apparatus according to claim 1, wherein the change means displays processing blocks included in the first generation logic, and changes a processing block selected by a user from the displayed processing blocks.
3. The information processing device according to claim 2, characterized in that the modification means generates the second generation logic by directly editing a selected processing block of the first generation logic, by modifying the selected processing block by using a preset generation logic, or by inputting an external file that defines a processing logic and modifying the selected processing block.
4. 4. The information processing apparatus according to claim 2, further comprising means for confirming whether the selected processing block changed by said change means is adaptable.
5. 5. The information processing apparatus according to claim 1, wherein the changes made by the change unit include changes in the calculation accuracy of pixel values of the image data or changes in the amount of recording material consumed by the printer.
6. 6. The information processing apparatus according to claim 1, wherein the acquisition unit acquires the first generation logic from the printer or a server.
7. 7. The information processing apparatus according to claim 1, wherein the generating means includes a data compression means for compressing the image data.
8. 8. The information processing apparatus according to claim 7, wherein the data compression is executed using the second program.
9. 9. The information processing apparatus according to claim 1, wherein the generating unit generates the print data by executing endian processing according to the printer.
10. 10. The information processing apparatus according to claim 9, wherein the generating means acquires the endian processing method from the printer, and executes endian processing appropriate for the printer based on the acquired method.
11. 11. The information processing apparatus according to claim 1, wherein the generating means has means for reserving a memory used for generating the print data and means for releasing the memory.
12. An information processing device according to claim 1, wherein the printer is a printer having an inkjet type recording head.
13. A control method for controlling an information processing device that generates print data using a first program written in JavaScript and a second program written in WebAssembly, comprising: an acquisition step of acquiring the second program describing first generation logic for executing, in the information processing device, a generation process that generates print data and is executed in a printer external to the information processing device; a modifying step of generating second generated logic in which at least a part of the first generated logic described by the acquired second program is modified; a generating step of generating print data to be printed by a printer using the input image data and the second generating logic; a sending step of sending the print data generated in the generating step to the printer; the first generating logic is configurable and associated with the printer; By changing at least a part of the first generation logic, the content of the generation process executed in the information processing device is changed; A control method characterized in that the first generation logic is executed using the second program.
14. A program that causes a computer to execute each step of the control method according to claim 13.
Citation Information
Patent Citations
Printer system
JP2002259085A
Device, method, and program
JP2016004321A
Program-execution control method, program, recording medium, web page, transmission server, client and web system
JP2019211849A