Print data compression method, print data compression device, and program

By dividing print images into regions and optimizing compression based on object proportions, the method addresses the challenge of maintaining printing order and efficiency in data transmission to printing devices, reducing delays and costs.

JP2026052929APending Publication Date: 2026-03-25CASIO COMPUTER CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Filing Date
2024-09-12
Publication Date
2026-03-25

AI Technical Summary

Technical Problem

Existing data compression methods for printing data, such as character and image data, fail to maintain the arrangement order during division, necessitating a new method that allows for efficient compression preprocessing before transmission to a printing apparatus.

Method used

A method that divides print images into regions based on design information, determining whether to compress each region based on the proportion of image objects, using algorithms like run-length encoding to optimize compression efficiency.

Benefits of technology

Enables efficient data compression that maintains the printing order, reducing transmission delays and computational costs, while ensuring high compression efficiency and appropriate data handling by the printing device.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2026052929000001_ABST
    Figure 2026052929000001_ABST
Patent Text Reader

Abstract

This provides a data compression technology suitable for compression processing performed as a pre-processing step before transmission to a printing device. [Solution] The print data compression method includes an information processing device dividing a print image into a plurality of regions located in different positions in the transport direction of the printing medium on which the print image is printed, based on the design information of the print image, and determining whether or not to compress the region data corresponding to each region of the print image based on the proportion of at least image objects in each of the plurality of regions identified using the design information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The disclosure of this specification relates to a printing data compression method, a printing data compression apparatus, and a program.

Background Art

[0002] Techniques related to the compression of overall data composed of multiple types of data are described, for example, in Patent Document 1. Patent Document 1 describes a technique in which, among the component data constituting display data, character data is stored in a compressed format and graphic data is stored as uncompressed data.

Prior Art Documents

Patent Documents

[0003]

Patent Document 1

Summary of the Invention

Problems to be Solved by the Invention

[0004] It is desirable that each data constituting the printing data be transmitted to the printing apparatus in the order in which it is used for printing. However, when each data of the printing data including character data and image data is arranged in the order in which it is used for printing, it may not be possible to divide the printing data into character data and image data while maintaining the arrangement order. For this reason, a new data compression method suitable for the compression process performed as preprocessing before transmission to the printing apparatus is required.

[0005] Based on the above circumstances, an object according to one aspect of the present invention is to provide a data compression technique suitable for the compression process performed as preprocessing before transmission to a printing apparatus.

Means for Solving the Problems

[0006] A print data compression method according to one aspect of the present invention includes a computer dividing a print image into a plurality of regions located in different positions in the transport direction of the printing medium on which the print image is printed, based on design information of the print image, and determining whether or not to compress the region data corresponding to each region of the print image based on the proportion of at least image objects in each of the plurality of regions identified using the design information.

[0007] A print data compression device according to one aspect of the present invention comprises a processor, which divides the print image into a plurality of regions located in different positions in the transport direction of the printing medium on which the print image is printed, based on design information of the print image, and determines whether or not to compress the region data corresponding to each region of the print image based on the proportion of at least image objects in each of the plurality of regions identified using the design information.

[0008] A program according to one aspect of the present invention causes a computer to perform a process that divides a print image into a plurality of regions located in different positions in the transport direction of the printing medium on which the print image is printed, based on design information of the print image, and determines whether or not to compress the region data corresponding to each region of the print image based on the proportion of at least image objects in each of the plurality of regions identified using the design information. [Effects of the Invention]

[0009] According to the above embodiment, it is possible to provide a data compression technology suitable for compression processing performed as a pre-processing step before transmission to a printing device. [Brief explanation of the drawing]

[0010] [Figure 1] This is a diagram illustrating the system configuration. [Figure 2] This is a diagram illustrating the configuration of an information processing device. [Figure 3]This is a sequence diagram showing an example of the process that takes place after a print operation. [Figure 4] This flowchart shows an example of the processing performed by an information processing device. [Figure 5] This figure shows an example of a label image. [Figure 6] Figure 5 shows an example of design information corresponding to the label image. [Figure 7] Figure 5 shows an example of how the label image can be divided into regions. [Figure 8] This figure shows another example of a label image. [Figure 9] Figure 8 shows an example of design information corresponding to the label image. [Figure 10] Figure 8 shows an example of how the label image can be divided into regions. [Figure 11] This is a diagram showing the structure of compressed data. [Figure 12] This is a diagram showing the structure of uncompressed data. [Figure 13] This diagram shows the structure of print data for transfer, starting with compressed data. [Figure 14] This diagram shows the structure of print data for transfer, starting with uncompressed data. [Figure 15] This flowchart shows an example of the processes performed by a printing device. [Modes for carrying out the invention]

[0011] The system shown in Figure 1 comprises a printing device 1 and an information processing device 100 that transfers print data to the printing device 1. The printing device 1 is a device that prints on a printing medium based on the received print data. The printing device 1 is not particularly limited, but for example, it is a label printer that prints on long tapes to create labels. The information processing device 100 is a computer such as a smartphone, tablet terminal, laptop computer, or desktop computer, and is a device on which the user performs the print operation. The information processing device 100 may also run an application that creates a print image to be printed on the printing medium, and when a print operation is performed, it transfers print data to the printing device 1 using the design information of the print image created by that application along with the print image. The printing device 1 and the information processing device 100 may be connected via a wired connection or via a wireless connection.

[0012] As shown in FIG. 2, the information processing apparatus 100 includes a processor 101, a storage device 102, an input device 103, a display device 104, and a communication device 105. The processor 101 includes, for example, a CPU (Central Processing Unit) and executes a program 102a stored in the storage device 102. Note that the processor 101 may include any electrical circuit such as a GPU (Graphics Processing Unit), an ASIC (Application Specific Integrated Circuit), an FPGA (Field-Programmable Gate Array), or a DSP (Digital Signal Processor). The storage device 102 is a non-transitory computer-readable medium and is, for example, any semiconductor memory. The storage device 102 includes a volatile memory such as a RAM (Random Access Memory), a ROM (Read Only Memory), and a non-volatile memory such as a flash memory. The storage device 102 may also include a magnetic storage device, an optical storage device, and other types of storage devices. A program 102a and data 102b are stored in the storage device 102. The program 102a is, for example, a program that compresses and transfers a print image. The data 102b includes, for example, a print image, design information, print data, and the like. The input device 103 is, for example, a keyboard, a mouse, or the like. The display device 104 is a display unit of the information processing apparatus 100 and is, for example, a liquid crystal display or the like. The input device 103 and the display device 104 may constitute a touch panel display. The communication device 105 is a communication unit that communicates with the printing apparatus 1 and may be, for example, a communication unit corresponding to wireless communication such as WiFi or BLE, or a wired communication unit.

[0013] In the system shown in Figure 1, as shown in Figure 3, when a user performs a print operation on the information processing device 100, the information processing device 100 generates print data representing the print image specified in the print operation and transfers it to the printing device 1 (step S10). The printing device 1, having received the print data, then performs printing based on the print data (step S20). The processes performed by the information processing device 100 and the processes performed by the printing device 1 will be explained in more detail below with reference to Figures 4 to 15.

[0014] In the information processing device 100, when a print operation is performed specifying a pre-created print image, the processor 101 executes program 102a to start the process shown in Figure 4. First, the processor 101 acquires the print image specified in the print operation and the design information of that print image (step S11). Here, the print image is information in which the information of each pixel (e.g., print density) expressed with a certain number of bits is arranged in the order of the pixels. For example, if the print density is expressed in 8 gradations, the number of bits for each pixel should be 3 bits or more. The print image contains one or more print image elements, each of which is a specific type of object, placed on the label L. The design information also includes information about the types of objects that constitute the print image elements (e.g., characters, emojis, images, etc.) and the arrangement of those objects. Note that the print image M1 shown in Figure 5 and the print image M2 shown in Figure 8 are examples of print images acquired in step S11, and the design information D1 shown in Figure 6 and the design information D2 shown in Figure 9 are examples of design information acquired in step S11.

[0015] The printed image M1 shown in FIG. 5 includes printed image elements M11, M12, and M13 that are arranged at different positions in the conveyance direction (Y direction) of the print medium within the label L created by the printing apparatus 1. Here, the printed image element M11 is a character object representing "ABCDE", the printed image element M12 is an image object photographed by a digital camera or the like, and the printed image element M13 is an emoji object representing a calculator. On the other hand, the design information D1 shown in FIG. 6 is the design information of the printed image M1 shown in FIG. 5, and shows the types and arrangements of the objects of the printed image elements M11, M12, and M13 that constitute the printed image M1. Specifically, the design elements D11, D12, and D13 included in the design information D1 are character objects, image objects, and emoji objects in which the printed image elements M11, M12, and M13 respectively have the maximum width W of the print area in the width direction (X direction) orthogonal to the conveyance direction of the print medium, and further, the design information D1 indicates that these objects are arranged in the conveyance direction (X direction) without gaps.

[0016] The print image M2 shown in Figure 8 consists of print image elements M21 and M22, which are positioned at different locations in the width direction (X direction) of the printing medium within the label L created by the printing device 1, and print image element M23, which is positioned at a different location from print image elements M21 and M22 in the transport direction (Y direction) of the printing medium within the label L. Here, print image element M21 is a character object representing "ABCDEFGHIJK", print image element M22 is an image object captured by a digital camera, etc., and print image element M23 is an emoji object representing a calculator. On the other hand, the design information D2 shown in Figure 9 is the design information for the print image M2 shown in Figure 8, and shows the types and arrangement of the objects of print image elements M21, M22, and M23 that constitute the print image M2. Specifically, design elements D21 and D22 included in design information D1 indicate that the print image elements M21 and M22, which together have the maximum width W of the print area in the width direction (X direction) of the printable medium, are character objects and image objects, respectively. Additionally, design element D23 included in design information D1 indicates that the print image element M23 with the maximum width W is an emoji object. Furthermore, design information D2 indicates that print image elements M21 and M23 are arranged without gaps in the transport direction (X direction), while print image elements M22 and M23 are arranged with a predetermined gap between them in the transport direction (X direction).

[0017] Next, the processor 101 divides the print image acquired in step S11 into multiple regions located at different positions in the transport direction of the printing medium on which the print image is printed, based on the design information acquired in step S11 (step S12). Here, the processor 101 uses design information that allows for the identification of the types and arrangement of objects included in the print image to divide the print image into regions that can be compressed with a relatively high compression ratio in the compression process described later and other regions. Image objects generally tend to have a lower compression ratio compared to text objects such as characters and emojis. Focusing on this point, the processor 101 may identify the positions of image objects in the print image based on the design information and, based on the identified positions of the image objects, divide the print image into one or more regions containing image objects (regions where a low compression ratio is expected) and one or more regions that do not contain image objects (regions where a high compression ratio is expected). Furthermore, the processor 101, focusing on the fact that printing progresses along the transport direction of the printing medium, divides the print image into multiple regions located at different positions in the transport direction in order that the print data can be transmitted in the transfer process described later according to the order in which it is used for printing. In other words, the print image is divided into multiple regions such that the boundaries between the regions are perpendicular to the transport direction.

[0018] For example, if step S11 acquires the print image M1 shown in Figure 5 and the design information D1 shown in Figure 6, the processor 101 divides the print image M1 into three regions, as shown in Figure 7: region R12 containing image objects, and regions R11 and R13 that do not contain image objects, all aligned along the transport direction. Also, for example, if step S11 acquires the print image M2 shown in Figure 8 and the design information D2 shown in Figure 9, the processor 101 divides the print image M2 into three regions, as shown in Figure 10: region R22 containing image objects, and regions R21 and R23 that do not contain image objects, all aligned along the transport direction.

[0019] When the print image is divided into multiple regions, the processor 101 determines whether or not to compress the region data corresponding to each region of the print image, and if it determines to compress, it compresses the region data (steps S13 to S17). Here, the processor 101 determines whether or not to compress each region data from the perspective of whether or not a high compression ratio can be obtained (steps S13, S15). Specifically, the processor 101 determines whether or not to compress the region data corresponding to each region of the print image based on the proportion of image objects in each of the multiple regions identified using the design information. This is because, generally, a high compression ratio cannot be obtained if the proportion of image objects is high enough. For this reason, the processor 101 may, for example, determine not to compress the region data corresponding to a region where the proportion of image objects is greater than or equal to a predetermined value, and omit the compression process. Note that in step S12, the regions are divided in advance in the transport direction, so the proportion of image objects within each region can be calculated using the width of the image objects in that region.

[0020] For example, if the region is divided into three areas as shown in Figure 7 in step S12, the processor 101 compresses the region data corresponding to regions R11 and R13 that do not contain image objects (steps S14 and S16), but does not compress the region data corresponding to region R12 that contains image objects. This is because the proportion of image objects in region R12 is 100%, making it difficult to obtain a high compression ratio. Also, if the region is divided into three areas as shown in Figure 10 in step S12, the processor 101 compresses the region data corresponding to regions R21 and R23 that do not contain image objects (steps S14 and S16). For the region data corresponding to region R22 that contains image objects, if the proportion of image objects in region R22 (W1 / W) is greater than or equal to the threshold Th, it is not compressed, and if it is less than the threshold Th, it is compressed (steps S14 and S16). The threshold Th is, for example, 30%.

[0021] The compression algorithm used in steps S14 and S16 is not particularly limited, but for example, an algorithm can be used to convert 8-level data, in which the grayscale information of each pixel is arranged according to the order of the pixels and each grayscale is represented by 3 bits, into 8-level data in 1-byte units, as shown in Figure 11, which consists of 3 bits representing the grayscale and 5 bits representing the number of consecutive occurrences of that grayscale. When pixels with the same grayscale tend to occur consecutively in a print image, such as print data transferred to a label printer, run-length encoding compression or an algorithm that applies it, as described above, is desirable from the viewpoint of compression efficiency. In particular, when dealing with multi-level pixel data, it is desirable to compress it using an algorithm that applies run-length encoding.

[0022] Once the determination is complete for all regions, the processor 101 synthesizes the data from each region to create print data (step S18) and transfers the created print data to the printing device 1 (step S19). The data for each region referred to here is the compressed data for regions where compression has been performed, for example, the 8-level data in 1-byte units consisting of 3 bits representing the gradation and 5 bits representing the number of consecutive occurrences of that gradation, as described above. In contrast, for regions where compression has not been performed, the data is uncompressed, that is, the region data (print image) itself, for example, the 8-level data in which the gradation information is arranged according to the order of the pixels, and the gradation of each pixel is represented by 3 bits, as described above.

[0023] In step S18, the processor 101 first determines whether compressed or uncompressed data is consecutive when the data in each region is arranged. If compressed or uncompressed data is consecutive, the processor 101 treats the consecutive compressed or uncompressed data as a single compressed or uncompressed data. Then, the processor 101 combines the alternately arranged compressed and uncompressed data to create print data. When combining the compressed and uncompressed data, the processor 101 adds an exit code to the end of the compressed data. The exit code can be any code that does not appear in the compression algorithm used. In the algorithm described above, the 5 bits indicating the number of consecutive occurrences cannot represent 0 (i.e., "00000b"), so the compressed data will not contain "00h". Therefore, as the exit code, for example, the 1-byte data "00h" as shown in Figure 11 may be used. However, the exit code is not limited to "00h" and may be any other 1-byte data that is not included in the compressed data. Furthermore, when combining compressed and uncompressed data, the processor 101 adds a header of a predetermined number of bytes (4 bytes in this example) to the beginning of the uncompressed data, as shown in Figure 12, to indicate the data size of the uncompressed data in a predetermined endianness, in order to identify the end position of the uncompressed data. This makes it possible to reliably identify the boundary between compressed and uncompressed data contained in the print data solely from the print data. In addition, the processor 101 adds a 1-bit data to the beginning to identify whether the created print data starts with compressed or uncompressed data. For example, as shown in Figure 13, if it starts with compressed data, the processor 101 may create the print data with "0b" at the beginning, and as shown in Figure 14, if it starts with uncompressed data, the processor 101 may create the print data with "1b" at the beginning.

[0024] When the printing device 1 receives print data from the information processing device 100, the processor of the printing device 1 starts the process shown in Figure 15. First, the processor of the printing device 1 acquires the received print data (step S21). Then, the processor sequentially reads the print data and determines whether the read data is compressed or not (step S22). For example, immediately after receiving print data, it is sufficient to determine whether the read data is compressed or not based on whether the leading bit is "0b" or "1b". If the leading bit is "0b", the processor 101 determines that it is compressed data (step S22 YES), decompresses the data read until the exit code "00h" appears, and then controls the printing mechanism to print (step S23). On the other hand, if the leading bit is "1b", the processor 101 determines that it is uncompressed data (step S22 NO), reads a predetermined number of bytes to obtain the data size of the uncompressed data, and then reads only that amount of data to obtain the uncompressed data portion. Subsequently, the printing mechanism is controlled based on the uncompressed data to perform printing (step S24). After reading the compressed or uncompressed data determined by the leading bit, it is determined whether the next data is compressed or uncompressed based on the alternating presence of compressed and uncompressed data (step S22), and processing is performed according to the determination result (steps S23, S24). When all print data has been processed (step S25YES), the process shown in Figure 15 is terminated.

[0025] According to the system described above, the information processing device 100 employs data compression technology suitable for pre-processing before transmission to the printing device 1, thereby shortening the time from print instruction to the end of printing. More specifically, the information processing device 100 divides the print image into multiple regions to be used for printing in a predetermined order by dividing the print image into regions in the transport direction, and then performs compression processing while deciding whether or not to compress each region. As a result, when the information processing device 100 transmits print data to the printing device 1, it is possible to transmit data corresponding to multiple regions in the order in which they will be used for printing. Therefore, printing delays caused by waiting for the receipt of print data due to a mismatch between the data transmission order and the printing order can be avoided. In addition, the information processing device 100 uses design information to perform region division and compression decisions. As a result, the information processing device 100 can appropriately select and compress regions in which high compression efficiency can be expected. In particular, by dividing the region into regions containing image objects and regions that do not and making compression decisions, it is possible to avoid unexpected increases in the amount of print data due to compression processing and wasted time required for compression and decompression processing. Furthermore, since the compression decision in the information processing device 100 is made based on the proportion of image objects contained in the region, appropriate compression decisions can be made not only when the region consists of a single object, but also when various types of objects are mixed in the region. This makes it possible to achieve both region division that can be expected to have high compression efficiency and region division that can avoid discrepancies between the transmission order and the printing order. Therefore, the information processing device 100 enables pre-transmission processing of print data that can shorten the total time required from print instruction to printing.

[0026] Furthermore, while print data may contain a mixture of compressed and uncompressed data, the print data is pre-configured so that the printer 1 can distinguish between them. Specifically, header information such as an exit code and byte count is included in the print data. This allows the printer 1 to perform the printing process appropriately simply by sending the print data. In addition, when the above-mentioned compression algorithm is adopted, compression and decompression can be performed with relatively low computational cost. Moreover, since the data can be decompressed sequentially from the beginning, decompression processing can be performed while receiving the print data. Therefore, the printer 1 does not need work memory to temporarily store the entire print data in order to decompress it, and can process compressed print data with a limited memory capacity.

[0027] The embodiments described above are provided as concrete examples to facilitate understanding of the invention, and the present invention is not limited to the embodiments described above, but should be understood as encompassing various modifications and alternative forms of the embodiments described above. For example, it will be understood that the embodiments described above can be materialized by modifying the components without departing from the spirit thereof. It will also be understood that various embodiments can be implemented by appropriately combining the multiple components disclosed in the embodiments described above. Furthermore, it will be understood by those skilled in the art that various embodiments can be implemented by deleting some components from all the components shown in the embodiments, or by adding some components to the components shown in the embodiments. In other words, the print data compression method, print data compression device, and program described above can be modified and changed in various ways without departing from the scope of the claims.

[0028] In the embodiments described above, 8-level grayscale print data was used as an example, but the print data is not limited to 8-level grayscale data; it may also be 16-level or 32-level grayscale print data. Furthermore, in the embodiments described above, an example was shown in which 8-level grayscale pixel data is represented by 3 bits, but it may be represented by 4 bits or more; for example, pixel data may be represented by 4 bits, where 1 byte represents the pixel data of 2 pixels. Also, in the embodiments described above, the unit data of the compressed data is composed of 1 byte, of which 5 bits are used to represent the number of consecutive occurrences, but the size of the area for representing the number of consecutive occurrences is not limited to 5 bits. The area for representing the number of consecutive occurrences may be limited to the number of bits that statistically increases the compression ratio.

[0029] In the embodiments described above, the decision to compress the data in a region was made based on the proportion of image objects in that region. However, the compression decision may also be made by considering the presence of other objects whose compression ratio trends are known, in addition to image objects. Furthermore, in the embodiments described above, the design information used for region division and compression decision was exemplified as data created together with the print image in an application that creates a print image. However, the design information can be any information that can be used to divide the print image into regions, and may be created separately from the print image. The design information may include, for example, information on the number of grayscale levels. Since a higher number of grayscale levels reduces the likelihood of the same data being continuous between pixels and thus lowers the compression efficiency, the processor 101 may, for example, make a compression decision based on the proportion of the region that has a predetermined number of grayscale levels or more. Furthermore, in the embodiments described above, a label printer was exemplified as the printing device 1. However, the printing device 1 may be a printer other than a label printer. Furthermore, in the embodiments described above, print data transmitted by the information processing device 100 to the printing device 1 was used as an example. However, the data obtained after compression processing in the information processing device 100 is not limited to print data. For example, it may be display data transmitted by the information processing device 100 to a display device. [Explanation of Symbols]

[0030] 1: Printing device, 100: Information processing device, 101: Processor, M1, M2: Print image, D1, D2: Design information, R11, R12, R13, R21, R22, R23: Area

Claims

1. Computers Based on the design information of the print image, the print image is divided into multiple regions whose positions differ in the transport direction of the printing medium on which the print image is printed. This includes determining whether or not to compress the region data corresponding to each region of the print image based on the proportion of at least image objects in each of the plurality of regions identified using the design information. Print data compression method.

2. In the print data compression method according to claim 1, Dividing the print image into the plurality of regions includes dividing the print image into one or more regions containing the image objects and one or more regions not containing the image objects, based on the position of the image objects in the print image. Print data compression method.

3. In the print data compression method according to claim 1 or claim 2, Determining whether or not to compress the region data includes determining that region data corresponding to a region where the proportion of the image object exceeds a predetermined value should not be compressed. Print data compression method.

4. Equipped with a processor, The aforementioned processor, Based on the design information of the print image, the print image is divided into multiple regions that are located in different positions in the transport direction of the printing medium on which the print image is printed. The system is configured to determine whether or not to compress the region data corresponding to each region of the print image based on the proportion of image objects in each of the multiple regions identified using the design information. Print data compression device.

5. On the computer, Based on the design information of the print image, the print image is divided into multiple regions that are located in different positions in the transport direction of the printing medium on which the print image is printed. Based on the proportion of image objects in each of the multiple regions identified using the design information, the system executes a process to determine whether or not to compress the region data corresponding to each region of the printed image. program.

Citation Information

Patent Citations

  • Image display control device and image display control method

    JP2014160177A