Portrayal sorting method, image forming device, equipment and storage medium

By analyzing the attributes and output modes of multi-page portraits in the image forming device, the number and output order of each page portrait are determined, and the order of disorder caused by the user's supplementary additional portraits is solved, ensuring that the printing effect meets user expectations and improving the user's Experience.

CN119322595AActive Publication Date: 2025-01-17ZHUHAI PANTUM ELECTRONICS CO LTD

Patent Information

Application Number
CN202411394498.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-30
Publication Date
2025-01-17
Estimated Expiration
2044-09-30

AI Technical Summary

Technical Problem

When the image forming device copies, the image order is likely to be confused by the user's addition of additional images, resulting in the final output not meeting user expectations.

Method used

By obtaining the properties and output mode of multi-page portraits, determine the number of each page portrait, and determine the output order based on the number and output mode, ensuring that the portraits are printed in the expected order.

Benefits of technology

It effectively avoids the problem of out-of-order portraits, ensures that the printing effect meets user needs, and improves user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119322595A_ABST
    Figure CN119322595A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of image forming devices, in particular to a portrait sorting method, an image forming device, equipment and a storage medium. The method is applied to the image forming device, and comprises the following steps: acquiring multiple pages of portraits input by a plurality of portrait sources, portrait attributes of each page of portraits and output modes of the multiple pages of portraits; according to the plurality of portrait sources and the portrait attributes, determining a portrait number of each page of portrait; determining an output sequence of each page of portrait according to the portrait number and the output mode; and printing and outputting each page of portrait according to the output sequence. According to the embodiment of the invention, after the multiple pages of portraits are obtained, the multiple pages of portraits are reordered according to the portraits attributes of the portraits, and the portraits are output based on the reordering result and the output mode selected by the user, so that the problem of out-of-order portraits can be avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of image forming devices, and in particular to a method for sorting images, an image forming device, equipment and a storage medium. Background Art

[0002] When the image forming device is copying, the image source is mostly from the image obtained by the image forming device itself after scanning the original. After the image forming device scans the original, the obtained image is cached in the order of scanning. Finally, the image is printed out according to the cached order. However, there is a situation in the related art where the order of the images printed out does not meet the user's printing requirements. For example, in some scenarios, when the user adds some additional images after the scan is completed, the order of the images will be disordered, and the final output image will not meet the user's expectations. Therefore, how to make the printing effect meet the user's needs is a problem that needs to be solved urgently. Summary of the invention

[0003] In view of this, the present application provides an image sorting method, an image forming device, an apparatus and a storage medium, which can overcome the problem of image disorder by reordering the received multiple pages of images and meet the user's needs for different printing effects.

[0004] In a first aspect, an embodiment of the present invention provides a method for sorting images, which is applied to an image forming device, and includes:

[0005] Obtain multiple pages of images input from several image sources, image attributes of each page of the images, and an output mode of the multiple pages of images;

[0006] Determining the image number of each page of images according to the image sources and the image attributes;

[0007] Determining the output order of each page of images according to the image number and the output mode;

[0008] Each page of the image is printed out according to the output sequence.

[0009] In a possible implementation, the portrait attributes include one or more combinations of the outer side of the front cover, the inner side of the front cover, the main text, the inner side of the back cover, and the outer side of the back cover.

[0010] In a possible implementation, determining the image number of each page of images according to the plurality of image sources and the image attributes includes:

[0011] Obtaining the total number of pages of the multiple-page portrait;

[0012] Determine the portrait identification information of each page of portraits according to the portrait attributes;

[0013] Sorting each page of portraits according to the sources of the portraits, the identification information of the portraits and the total number of pages;

[0014] Each page of portraits is numbered according to the result of the sorting to obtain the portrait number of each page of portraits.

[0015] In a possible implementation, the image source is a single image source, and the image number of each page of images is determined according to the plurality of image sources and the image attributes, including:

[0016] Obtaining the total number of pages of the multiple-page portrait;

[0017] According to the image attributes of each page of the image corresponding to the image source and the total number of pages of the multiple pages of images, the image number of each page of the image corresponding to the image source is determined.

[0018] In a possible implementation, the image sources are at least two, and determining the image number of each page of images according to the plurality of image sources and the image attributes includes:

[0019] Determine the first arrangement order of each image source and the number of sub-pages of the image corresponding to each image source; wherein the sum of the number of sub-pages of the image corresponding to each image source is used as the total number of pages of the multiple-page image;

[0020] For any image source, according to the image attributes of each image in the image source and the number of sub-pages of all images in the image source, determine the second arrangement order of each image corresponding to the image source;

[0021] The image number of each page of images is determined based on the first arrangement order of each image source, the second arrangement order of all images in each image source and the total number of pages.

[0022] In a possible implementation, the output mode includes at least a printing mode and a typesetting mode, and determining the output order of each page of images according to the image number and the output mode includes:

[0023] The output order of each page of images is determined according to the printing mode, the typesetting mode and the image number of each image.

[0024] In a possible implementation, the layout mode is a multi-page-in-one layout mode, and determining the output order of each page of portraits according to the printing mode, the layout mode, and the portrait number of each portrait includes:

[0025] Determine the number of pages to be printed; the number of pages to be printed is used to represent the number of sheets of paper required to print all the images;

[0026] Divide the printing surface of each printing page into M reduction printing areas; wherein M is a positive integer greater than or equal to 2;

[0027] Determining the image number of the image corresponding to each of the reduced print areas;

[0028] The output order of each page of images is obtained according to the image number of each image corresponding to the reduced print area, the printing mode and the typesetting mode.

[0029] In a possible implementation, determining the number of printed pages includes:

[0030] Acquire the total number of pages of the multi-page portrait and the layout setting information corresponding to each of the printing pages in the multi-page-in-one typesetting mode;

[0031] The number of pages to be printed is determined according to the total number of pages and the layout setting information.

[0032] In a possible implementation, the layout setting information includes row number information and column number information, and the printing surface of each printing page is divided into M reduction printing areas, including:

[0033] The printing surface of each printing page is divided into M reduction printing areas according to the row number information and the column number information.

[0034] In a possible implementation, determining the image number of the image corresponding to each of the reduced print areas includes:

[0035] Determine the area position of each reduction area on the print surface of the print page;

[0036] Determining the region order of each reduced print region in the print surface of the print page according to the M and the region position;

[0037] The image number of the image corresponding to each reduced print area in each printing page is determined according to the number of printing pages and the area sequence.

[0038] In a possible implementation, determining the image number of the image corresponding to each reduced print area in each printed page according to the number of printed pages and the area sequence includes:

[0039] The image number of the image corresponding to each reduction print area is determined according to the predetermined mapping relationship between the area sequence of each reduction print area in each printing page and the image number and the number of printing pages.

[0040] In a possible implementation, the printing mode is a single-sided printing mode, and in different printed pages, the image numbers corresponding to the reduced print areas at the same position are arranged continuously.

[0041] In a possible implementation, the printing mode is a double-sided printing mode, and in each of the printed pages, the first image number corresponding to the first reduced printing area located on the first side of the printed page and the second image number corresponding to the second reduced printing area located on the second side of the printed page are arranged consecutively; wherein the area position of the first reduced printing area in the first side and the area position of the second reduced printing area in the second side are mirror-symmetrical.

[0042] In a possible implementation, the output mode at least includes a typesetting mode. When the typesetting mode is a common output mode, determining the output order of each page of images according to the image number and the output mode includes:

[0043] Obtaining output rules of the common output mode; the output rules include forward order output and reverse order output;

[0044] If the output rule of the common output mode is positive order output, the output order of the multiple pages of portraits is in ascending order of portrait numbers;

[0045] If the output rule of the common output mode is reverse output, the output order of the multiple pages of images is in descending order of the image numbers.

[0046] In a possible implementation, the output mode includes at least a typesetting mode, the typesetting mode is a booklet mode, and the total number of pages of the multiple-page portraits satisfies a first constraint condition, and determining the output order of each page of the portraits according to the portrait numbers and the output mode includes:

[0047] Arrange the plurality of pages of portraits in ascending order and in descending order according to the portrait numbers to obtain corresponding ascending order image groups and descending order image groups;

[0048] The first image corresponding to the nth page in the positive order image group and the second image corresponding to the nth page in the reverse order image group are divided into one group to obtain multiple groups of image sets; wherein n≤total number of pages / 2;

[0049] Arrange multiple sets of portraits according to preset sorting rules;

[0050] The output order of the plurality of image sets is determined according to the output mode and the result of the arrangement.

[0051] In a possible implementation, the output mode includes at least a typesetting mode, the typesetting mode is a booklet mode, and the total number of pages of the multiple-page portrait does not satisfy a first constraint condition, and determining the output order of each page of the portrait according to the portrait number and the output mode includes:

[0052] Arrange the plurality of pages of portraits in ascending order and in descending order according to the portrait numbers to obtain corresponding ascending order image groups and descending order image groups;

[0053] Inserting a blank image after the last image in the normal order image group, and inserting a blank image before the first image in the reverse order image group, so that the total number of pages in the normal order image group and the total number of pages in the reverse order image group both meet the first constraint condition;

[0054] The third image corresponding to the nth page in the positive sequence image group after the blank image is inserted and the fourth image corresponding to the nth page in the reverse sequence image group after the blank image is inserted are grouped into one group to obtain a plurality of image sets;

[0055] Arrange multiple sets of portraits according to preset sorting rules;

[0056] The output order of the plurality of image sets is determined according to the output mode and the result of the arrangement.

[0057] In a second aspect, an embodiment of the present invention provides an image forming device, including:

[0058] An acquisition module, used for acquiring multiple pages of images input from several image sources, image attributes of each page of images, and an output mode of the multiple pages of images;

[0059] A numbering module, used to determine the image number of each page of images according to the image sources and the image attributes;

[0060] A processing module, used for determining the output order of each page of images according to the image number and the output mode;

[0061] The execution module is used to print out each page of the image according to the output sequence.

[0062] In a third aspect, an embodiment of the present invention provides an electronic device, including:

[0063] at least one processor; and

[0064] at least one memory in communication with the processor, wherein:

[0065] The memory stores program instructions executable by the processor, and the processor calls the program instructions to execute the method described in the first aspect.

[0066] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions, and the computer instructions enable the computer to execute the method described in the first aspect.

[0067] In a fifth aspect, an embodiment of the present invention provides a computer program product, wherein the computer program product comprises a computer program, and when the computer program is executed by a processor, the method described in the first aspect is implemented.

[0068] In an embodiment of the present invention, after acquiring multiple pages of portraits, the multiple pages of portraits are reordered according to the portrait attributes, and the portraits are output based on the reordering results and the output mode selected by the user, thereby avoiding the problem of disordered portraits. BRIEF DESCRIPTION OF THE DRAWINGS

[0069] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0070] Figure 1 A flowchart of a portrait sorting method provided by an embodiment of the present invention;

[0071] Figure 2 A schematic diagram of a reduction printing area provided by an embodiment of the present invention;

[0072] Figure 3a A schematic diagram of a printing page provided by an embodiment of the present invention;

[0073] Figure 3b A schematic diagram of another printing page provided by an embodiment of the present invention;

[0074] Figure 3c A schematic diagram of another printing page provided by an embodiment of the present invention;

[0075] Figure 4 A schematic diagram of another printing page provided by an embodiment of the present invention;

[0076] Figure 5 A schematic diagram of another printing page provided by an embodiment of the present invention;

[0077] Figure 6 A schematic structural diagram of an image forming device provided by an embodiment of the present invention;

[0078] Figure 7 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0079] In order to better understand the technical solution of the present application, the embodiments of the present application are described in detail below with reference to the accompanying drawings.

[0080] It should be clear that the described embodiments are only part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work are within the scope of protection of the present application.

[0081] The terms used in the embodiments of the present application are only for the purpose of describing specific embodiments, and are not intended to limit the present application. The singular forms "a", "said" and "the" used in the embodiments of the present application and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings.

[0082] It should be understood that the term "and / or" used in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.

[0083] In the copying scenario, the image source of the copying job of the image forming device is mostly the image obtained by the image forming device itself after scanning the original. The images are generally arranged in the order in which the original is scanned. When some supplementary images are inserted, the arrangement order of the images will be disordered, resulting in the final output printing effect not meeting the user's expectations.

[0084] For example, in a double-sided copying scenario, the user makes a double-sided copy of three pages of the original, and obtains 6 pages of scanned images. They are the cover, pages 1-4 of the text, and the back cover. When the user inserts a blank image on the inside of the cover through the image forming device, the order of the images changes from: cover, page 1 of the text, page 2 of the text, page 3 of the text, page 4 of the text, and back cover to: inside of the cover (i.e. the inserted blank image on the inside of the cover), cover, page 1 of the text, page 2 of the text, page 3 of the text, page 4 of the text, and back cover. It can be seen that when the order of the images is disordered, the final printed effect is inconsistent with the actual effect the user wants, and the user experience is poor.

[0085] Therefore, the correctness of the image sequence is an important guarantee for the correct output effect of the image. Based on this, the embodiment of the present invention provides an image sorting method, an image forming device, a device and a storage medium, which reorders the images by numbering them, so that the order of the output images meets the user's expectations. For copying operations, the step of reordering the images can be implemented in the copy module of the image forming device. However, because the image sources of the copied images include not only the images obtained by flatbed scanning and the images obtained by ADF scanning, but also images from other sources, such as images sent by the PC, and images merged into other image forming devices in the same network segment. Therefore, the output method of the image in the embodiment of the present invention can be applied to the copy module of the image forming device or to other modules in the image forming device that can output images, so that the images from all sources can be reordered.

[0086] Figure 1 A flowchart of a method for sorting portraits provided by an embodiment of the present invention. Figure 1 As shown in , the method includes:

[0087] Step 101, obtaining multiple pages of images input from several image sources, image attributes of each page of the images, and an output mode of the multiple pages of images.

[0088] In the copying scenario, the main image of the image forming device comes from the scanning module of the image forming device itself. The user places the multi-page original document in the scanning area of ​​the image forming device and sets the output mode before issuing the copy job. Among them, the output mode may include ordinary copy output, booklet mode, and multi-page typesetting mode. After receiving the copy job issued by the user, the image forming device scans the multi-page original document in the scanning area to obtain the corresponding multi-page image. The image forming device determines the image attributes of each page image according to the scanning order and the original document constituent elements set by the user when issuing the job. Among them, the original document constituent elements include: cover, text, back cover, etc. In the double-sided printing scenario, the cover is divided into the outer side of the cover and the inner side of the cover. The back cover is divided into the outer side of the back cover and the inner side of the back cover. When the user issues a double-sided copy job, if the user sets the original document constituent elements to cover + text + back cover, the image forming device uses the image of the front side of the first page of the original document scanned as the outer side of the cover, and uses the image of the back side of the first page of the original document as the inner side of the cover. The image on the front of the last page of the manuscript is used as the inner side of the back cover, and the image on the back of the last page of the manuscript is used as the outer side of the back cover. If the user issues a single-sided copy job, and the user sets the manuscript constituent elements as cover + text + back cover, the image forming device will use the image of the first page of the manuscript scanned as the cover, and the image of the last page of the manuscript as the back cover. The user selects the manuscript constituent elements according to the actual situation of the manuscript, and then the image forming device obtains the image attributes of each page of the image according to the manuscript constituent elements and the scanning order of the manuscript.

[0089] Furthermore, the image forming device can also receive images transmitted from other image sources (eg, smart terminal devices such as mobile phones, computers, other image forming devices, etc.).

[0090] The above-mentioned image attributes correspond to the elements constituting the original document. In a double-sided printing scenario, the image attributes may include the outer side of the front cover, the inner side of the front cover, the main text, the outer side of the back cover, and the inner side of the back cover. In a single-sided printing scenario, the image attributes may include the front cover, the main text, and the back cover. Therefore, in some scenarios, there may be a situation where there is no front cover and back cover, but only the main text. Also, there is only the front cover and the main text, but no back cover. Also, there is a situation where there is a back cover and the main text, but no front cover. Also, there is a situation where there is a front cover, the main text, and the back cover. Also, there is only the front cover and the back cover, but no main text, etc.

[0091] In a single-sided copying scenario where the original is single-sided, the image forming device can usually determine the first scanned original page as the cover, the second scanned original page as the first body page, the third scanned original page as the second body page... and the last scanned original page as the back cover. For the single-sided copying mode scenario, the image attributes of the multi-page portrait obtained are: the outside of the front cover, the body, and the outside of the back cover. For the double-sided copying scenario, the image attributes of the multi-page portrait obtained are: the outside of the front cover, the inside of the front cover, the body, the inside of the back cover, and the outside of the back cover. The body includes body page 1, body page 2... body page n.

[0092] Step 102, determining the image number of each page of images according to a number of image sources and image attributes.

[0093] After determining the portrait attributes of each page of portraits, the portrait number of each page of portraits can be determined according to the portrait attributes as the unique identification information of the portrait. Specifically, the total number of pages of multiple portraits can be obtained first. When the portrait source is one, the number of portraits contained in the portrait source is the total number of pages. When the portrait sources are multiple, the total number of pages is the sum of the number of portraits contained in the multiple portrait sources. Then, the portrait identification information of each page of portraits is determined according to the portrait attributes. For the portrait whose portrait attribute is the outside of the cover, its portrait identification information can be determined to be COVER_1. For the portrait whose portrait attribute is the inside of the cover, its portrait identification information can be determined to be COVER_2. For the portrait whose portrait attribute is the first page of the text, its portrait identification information can be determined to be CONTEXT_1.

[0094] Afterwards, the portraits on each page can be sorted according to the sources of the portraits, the identification information of each portrait and the total number of pages, and the portraits on each page can be numbered according to the sorting result to obtain the portrait number of each page.

[0095] In some embodiments, when the image source is a single image source, the image number of each page of the image corresponding to the image source is determined directly according to the image attributes of each page of the image corresponding to the image source and the total number of pages of the multiple pages of the image. Optionally, the numbering range of the image number can be determined according to the total number of pages of the multiple pages of the image. If the total number of pages is m, then the numbering range of the image number is 1 to m. Afterwards, the multiple pages of the image corresponding to the image source can be sorted in the order of cover, text, and back cover according to the image attributes. For a single-sided copying scenario, the original document constituent elements set by the user are cover + text + back cover. The sorting result is: cover, text page 1 to text page n, back cover, where the total number of pages m is the number of text pages + cover + cover, that is, m=n+2. For a double-sided copying scenario, the original document constituent elements set by the user are cover + text + back cover. The sorting results are: outer side of the cover, inner side of the cover, page 1 to page n of the text, inner side of the back cover, and outer side of the back cover, where the total number of pages m is the number of pages of the text + outer side of the cover + inner side of the cover + outer side of the back cover + inner side of the back cover, that is, m=n+4.

[0096] After the sorting is completed, each page of the portrait can be numbered in turn according to the sorting result to obtain the portrait number of each page of the portrait. For example, for a single-sided copying scenario, the total number of pages m is 4, that is, there are 4 pages of portraits. After sorting according to the portrait attributes, the sorting results are: COVER_1 (page 1, that is, the cover), CONTEXT_1 (page 2, that is, the first page of the text), CONTEXT_2 (page 3, that is, the second page of the text), COVER_4 (page 4, that is, the back cover). That is, the cover + two pages of text + the back cover. At this time, the portrait numbers of each sorted portrait are defined in sequence, and the portrait number of COVER_1 is 1. The portrait number of CONTEXT_1 is 2. The portrait number of CONTEXT_2 is 3. The portrait number of COVER_4 is 4. Optionally, the step of numbering the portraits can be specifically implemented as unifying the portrait file names. Unification specifically refers to unifying the prefixes of the file names of multiple pages of portraits, and only the numbers at the end of the file names are different and the numbers are continuous. The number at the end of the file name is the portrait number of the portrait. In the scenario with a cover, back cover, and text, the portrait identification information of each portrait can be determined first, and then the portrait can be renamed based on the portrait identification information. For example, after the above 4 pages of portraits are unified, the file name of the portrait on page 1 (i.e., the cover) changes from COVER_1 to PREFIX_1, the file name of the portrait on page 2 (i.e., page 1 of the text) changes from CONTEXT_1 to PREFIX_2, the file name of the portrait on page 3 (i.e., page 2 of the text) changes from CONTEXT_2 to PREFIX_3, and the file name of the portrait on page 4 (i.e., the back cover) changes from COVER_4 to PREFIX_4. Then, after sorting the 4 pages of portraits from small to large according to the file name, the sorting result is: PREFIX_1, PREFIX_2, PREFIX_3, PREFIX_4. The suffix number of the renamed file name of each page of portrait is the portrait number of the portrait. Through the above-mentioned unified processing, it is convenient to sort the portraits, so as to avoid sorting problems caused by inconsistent file name prefixes.

[0097] In some embodiments, when there are at least two sources of portraits, it is necessary to determine the order between the sources of the portraits. Then, the portraits corresponding to the respective sources of the portraits are sorted in units of the portrait sources. Specifically, the first arrangement order of the respective portrait sources and the number of sub-pages of the portraits corresponding to the respective portrait sources are first determined. Among them, the sum of the number of sub-pages of the portraits corresponding to the respective portrait sources is equal to the total number of pages. The first arrangement order of the respective portrait sources is determined according to the user's settings. When the user does not set the arrangement order of the respective portrait sources, the first arrangement order of the respective portrait sources is determined by the order in which the respective portrait sources send the portraits to the image forming device. For example, there are three portrait sources, namely A, B and C. Among them, A contains 2 pages of portraits, B contains 1 page of portraits, and C contains 3 pages of portraits. The user sets the arrangement order of the portrait sources to be B first, then C, and finally A. Then the first arrangement order of the three portrait sources is: B, C, A. The total number of pages m=2+1+3=6.

[0098] For any portrait source, the second arrangement order of each portrait corresponding to the portrait source is determined according to the portrait attributes of each portrait in the portrait source and the number of sub-pages of all portraits in the portrait source. This step is the same as the step of determining the order of multiple pages of portraits in the above-mentioned single portrait source scenario. Finally, the portrait number of each page of the portrait is determined according to the first arrangement order of the portrait source, the second arrangement order of all portraits in each portrait source, and the total number of pages. For example, the total number of pages is 10 pages, and there are three portrait sources, namely A, B and C. The three portraits contained in A are arranged in order of portrait attributes as a, b and c. The four portraits contained in B are arranged in order of portrait attributes as d, e, f and g. The three portraits contained in C are arranged in order of portrait attributes as h, i and j. The arrangement order of the three portrait sources is: C, A, B. First, the range of the portrait number is determined to be 0-10 based on the total number of pages 10. Then, according to the first arrangement order of the image sources, the three images contained in the image source C are determined to be in the front position, the three images contained in the image source A are in the middle position, and the four images contained in the image source B are in the last position. Combined with the second arrangement order of each image, the order of the 10 pages of images is image source C (h, i, j), image source A (a, b, c), and image source B (d, e, f, g). After the images are numbered consecutively in this order, the image numbers of each page of images are: h (image number 1), i (image number 2), j (image number 3), a (image number 4), b (image number 5), c (image number 6), d (image number 7), e (image number 8), f (image number 9), and g (image number 10).

[0099] Step 103, determining the output order of the multiple pages of images according to the image numbers and the output mode.

[0100] Among them, the output mode includes a printing mode and a typesetting mode. The printing mode specifically includes a single-sided printing mode and a double-sided printing mode. The typesetting mode includes a multi-page typesetting mode, a normal output mode, a booklet mode, etc. Among them, the multi-page typesetting mode is used to represent that multiple images are printed on one page of paper (it should be noted that the multi-page typesetting mode is a general term for the N-page typesetting mode, that is, different multi-page typesetting modes correspond to different N. For example, if N=2, the multi-page typesetting mode is a two-in-one typesetting mode, which is characterized by two images being reduced and printed on one page of paper. If N=4, the multi-page typesetting mode is a four-in-one typesetting mode, which is characterized by four images being reduced and printed on one page of paper. If N=8, the multi-page typesetting mode is an eight-in-one typesetting mode, which is characterized by eight images being reduced and printed on one page of paper), and the normal output mode is that one image is printed on one page of paper. The booklet mode can print two images on one side of the paper, and it is double-sided printing. After printing is completed, fold it along the intersection of the two images printed on one side to obtain a booklet with pages that can be turned.

[0101] Afterwards, the output order of each page of portraits can be determined according to the printing mode, typesetting mode and the portrait number of each portrait. Among them, the output order is the printing order of multiple pages of portraits when printing, and the portrait number is only used as the identification information of the portrait, and each page of the portrait is not necessarily printed out according to the order of the portrait number. The output order of multiple pages of portraits is mainly determined by the printing mode and typesetting mode. When the user selects the typesetting mode as the normal output mode, the output rules of the normal output mode set by the user can also be obtained. If the output rule of the normal output mode is positive output, the multiple pages of portraits can be printed out in the order of the portrait numbers from small to large. If the output rule of the normal output mode is reverse output, the multiple pages of portraits can be printed out in the order of the portrait numbers from large to small.

[0102] When the user sets the typesetting mode to booklet mode, the corresponding printing mode defaults to double-sided printing. In addition, since two portraits need to be printed on one side of the paper in the booklet scenario, a total of four portraits are printed on both sides of a sheet of paper in double-sided printing mode. Therefore, it is necessary to specifically determine whether the total number of pages of multiple portraits meets the first constraint condition to determine whether blank portraits need to be inserted to supplement the total number of portraits to meet the first constraint condition. Among them, since in this scenario, a total of four portraits need to be printed on both sides of a page of paper, the first constraint condition can be specifically implemented as whether the total number of pages is an integer multiple of 4. Specifically, for the case where the total number of pages is an integer multiple of 4, there is no need to insert blank portraits. Multiple pages of portraits can be first arranged in positive order and reverse order according to the portrait numbers to obtain a positive image group and a reverse image group. Then, the first portrait corresponding to the nth page in the positive image group and the second portrait corresponding to the nth page in the reverse image group are divided into a group to obtain multiple portrait sets, where n≤total number of pages / 2. By changing the value of n from 1 to the total number of pages / 2 in ascending order, n sets of portraits can be obtained. Then, multiple sets of portraits are arranged according to the preset sorting rules. Among them, the preset sorting rules can be implemented as a method of printing from the middle of the booklet to both sides, that is, starting from the portrait with the page number in the middle, and then expanding in the direction of the front cover and the back cover. The output order of multiple sets of portraits can be obtained based on the preset sorting rules. For example, the portrait set obtained according to n=1 is arranged at the last position in the printing order, and the portrait set obtained by taking the maximum value of n is arranged at the front position of the printing order, that is, the first position. Finally, the output order of multiple sets of portraits is determined according to the output mode and the arrangement results.

[0103] For example, there are 8 pages of portraits (i.e., the total number of pages is 8), and the portrait numbers are 1 to 8. Since the total number of pages 8 is an integer multiple of 4, there is no need to insert blank portraits. Then the image group obtained after the positive order is: portrait numbers 1 to 8. The image group obtained after the reverse order is: portrait numbers 8 to 1. Then the value of n is 1 to 4. Therefore, four groups of portrait sets can be obtained according to the order of n values ​​from 1 to 4. They are: The first group: the first one in the positive order image group (portrait number 1) and the first one in the reverse order image group (portrait number 8). The second group: the second one in the positive order image group (portrait number 2) and the second one in the reverse order image group (portrait number 7). The third group: the third one in the positive order image group (portrait number 3) and the third one in the reverse order image group (portrait number 6). The fourth group: the fourth position in the positive image group (portrait number 4) and the fourth position in the reverse image group (portrait number 5), and finally, according to the preset sorting rules corresponding to the booklet, the arrangement order of the multiple groups of portraits is obtained by sorting in reverse order: the fourth group, the third group, the second group, and the first group. Based on the arrangement order of the multiple groups of portraits, the output order of the multiple pages of portraits is: portrait number 4, portrait number 5, portrait number 3, portrait number 6, portrait number 2, portrait number 7, portrait number 1, and portrait number 8.

[0104] For the printing scenario where the total number of pages does not meet the first constraint condition, that is, the total number of pages is not an integer multiple of 4, the number of blank images that need to be supplemented is determined. The remainder after the total number of pages is divided by 4 can be calculated first. 4 minus the remainder is the number of blank images that need to be supplemented. Then, the image numbers of multiple pages are arranged in positive order and reverse order to obtain a positive image group and a reverse image group. Then, a corresponding number of blank images are inserted after the last image in the positive image group, and a corresponding number of blank images are inserted before the first image in the reverse image group, so that the total number of pages in the positive image group and the total number of pages in the reverse image group are supplemented to an integer multiple of 4, so that the total number of pages in the positive image group and the total number of pages in the reverse image group meet the first constraint condition. Finally, the third image corresponding to the nth page of the positive image group after the blank image is inserted and the fourth image corresponding to the nth page of the reverse image group after the blank image is inserted are grouped into a group to obtain multiple sets of images. Then, the multiple sets of images are arranged according to the preset sorting rules, and the output order of the multiple sets of images is determined according to the output mode and the arrangement results.

[0105] For example, there is a total of one image source, including 6 pages of images (i.e., the total number of pages is 6), and the image numbers corresponding to the 6 pages of images are 1 to 6. Since the total number of pages 6 is not an integer multiple of 4, 2 pages of blank images need to be inserted. Specifically, blank image 1 and blank image 2 are inserted after the last image of the positive image group (i.e., image number 6). And blank image 3 and blank image 4 are inserted before the first image of the reverse image group (image number 6). Then the positive image group becomes: image numbers 1 to 6, blank image 1, blank image 2. The reverse image group becomes: blank image 3, blank image 4, image numbers 6 to 1. After inserting 2 pages of blank images, the total number of pages of the positive image group and the reverse image group is 8, and the value of n is 1 to 4. Therefore, four groups of image sets can be obtained according to the order of n values ​​from 1 to 4. They are: Group 1: the first bit of the positive image group (image number 1) and the first bit of the reverse image group (blank image 3). The second group: the second position of the positive image group (portrait number 2) and the second position of the reverse image group (blank portrait 4). The third group: the third position of the positive image group (portrait number 3) and the third position of the reverse image group (portrait number 6). The fourth group: the fourth position of the positive image group (portrait number 4) and the fourth position of the reverse image group (portrait number 5). Finally, according to the preset sorting rules corresponding to the booklet, the arrangement order of the multiple portrait sets is obtained by sorting in reverse order: the fourth group, the third group, the second group, the first group. Based on the arrangement order of the multiple portrait sets, the output order of the multiple pages is: portrait number 4, portrait number 5, portrait number 3, portrait number 6, portrait number 2, blank portrait 4, portrait number 1 and blank portrait 3.

[0106] In some embodiments, for the multi-page-in-one typesetting mode, it is necessary to reduce and print multiple portraits on one page. Therefore, the number of printed pages can be determined first, and the number of printed pages is used to characterize the number of papers required to print all portraits. Then the printing surface of the printed page is divided into M reduction printing areas, each reduction printing area corresponds to an image, and the number of reduction printing areas on each printing surface is the number of portraits printed on the printing surface. Among them, for the single-sided printing scenario, each printed page has only one printing surface. For the double-sided printing scenario, each printed page has two printing surfaces, front and back, corresponding to the front and back sides of the paper respectively. Among them, M is a positive integer greater than or equal to 2. Then determine the portrait number of each reduction printing area corresponding to the portrait. Among them, the portrait corresponding to the reduction printing area refers to the portrait printed on the reduction printing area. The portrait number range of each printed page is calculated by the number of printed pages. For example, when the first page is reduced to 2*3 portraits, the portrait number range of the first page is 1 to 6. Finally, according to the portrait number of the portrait corresponding to the reduction printing area, the printing mode, and the typesetting mode, the output order of each page portrait is obtained.

[0107] Specifically, the total number of pages of multi-page portraits and the layout setting information corresponding to each printed page in the multi-page-in-one typesetting mode can be obtained first. When selecting the multi-page-in-one typesetting mode, the user needs to set the number of portraits printed on each printing surface as the layout setting information. It specifically includes the number of portraits printed on each printing surface. The layout setting information can also include row number information m and column number information t, and the number of portraits printed on a page of paper can be calculated by the row number information m and the column number information t. Among them, the row number information m is used to indicate that m rows of portraits are printed on one side of the printed page, and the column number information t is used to indicate that t columns of portraits are printed on one side of the printed page. For a single-sided printing scenario, m×t portraits are reduced on each sheet of paper. Then, in a single printed page, t portraits are reduced for each row, and m portraits are reduced for each column. For a double-sided printing scenario, m×t portraits are reduced on one side of the paper, and m×t×2 portraits are reduced on both sides of a page of paper. The image forming device obtains the layout setting information.

[0108] In some embodiments, the user can set the values ​​of m and t respectively by manual input. Alternatively, the image forming device displays options such as four pages in one, six pages in one, eight pages in one, and sixteen pages in one. After the user selects the multi-page in one option, the image forming device can further display multiple different reduction layouts. For example, after the user selects the six-page in one option, the image forming device displays two reduction layouts: a 2×3 layout screen (i.e., m=2, t=3) and a 3×2 layout screen (i.e., m=3, t=2), and displays the corresponding preview effect. The user can select the corresponding reduction layout without manually setting the row number information m and column number information t. If the user does not select a reduction layout, the default is 2×3 or 3×2.

[0109] Afterwards, the number of pages to be printed can be determined based on the total number of pages and the layout setting information. The number of pages to be printed f is used to represent the number of sheets of paper required to print all the images. The number of pages to be printed f can be calculated using formula (1):

[0110]

[0111] Where N is the total number of pages of the multi-page portrait, m is the number of rows in the layout setting information of the multi-page-in-one typesetting mode, and t is the number of columns in the layout setting information of the multi-page-in-one typesetting mode. When the value of f calculated by formula (1) is a non-integer containing a decimal, a scientific notation method of rounding up can be used to obtain an integer value that does not contain a decimal part. Specifically, rounding up means that when the value of f has a decimal, the integer value is increased by one regardless of the decimal value, and the decimal part is removed. For example, after calculation, the value of f is 6.2, then the decimal part of 0.2 is removed, and the integer part 6 is increased by one, and the final value of f is 7.

[0112] After that, the regional position of each reduction area on the printing surface of the printing page can be determined first. Then, the regional order of the reduction areas on the printing surface can be determined according to the number M of reduction areas on the printing surface and the regional positions corresponding to the reduction areas. After the regional order of each reduction area is determined, the image number of the image corresponding to each reduction area can be determined according to the number of printed pages and the regional order. That is, the image number of the image printed on the reduction area.

[0113] The image number corresponding to each reduction area in each printing page can be determined according to the mapping relationship between the area sequence of each reduction area in each printing page and the image number and the number of printing pages. The range of image numbers corresponding to each printing page can be determined first, that is, the starting image number and the ending image number of each printing page can be determined. For the xth printing page, its starting image number is F(x) 起 It means that F(x) is calculated by formula (2) 起 , end the image numbering with F(x) 终 , calculated by formula (3) to get F(x) 终 . , the number of shrinkage areas M can be obtained by formula (4)

[0114] F(x) 起 =(x-1)*M+1-----------------------(2)

[0115] F(x) 终 =x*M----------------------------------(3)

[0116] M=m*t-------------(4)

[0117] Where M is the number of reduced print areas in the print surface of a single print page; x refers to the number of the print page, x≤f.

[0118] by Figure 2 For example, when M is 6 and x=1, the starting image number of the first printed page is F(1). 起 =(1-1)×6+1=1, the ending image number is F(1) 终 =1×6=6, then the image numbers of all images on the first print page range from 1 to 6. When x=2, the starting image number of the second print page is F(2) 起 =(2-1)×6+1=7, the ending image number is F(2) 综 =2×6=12, then the image numbers of all images on the second printed page range from 7 to 12.

[0119] Afterwards, the image numbers corresponding to the respective reduction print areas can be determined according to the area order of the respective reduction print areas in the printed page and the starting image number and ending image number of the printed page. Specifically, the multiple image numbers in the image number range corresponding to each printed page are arranged in ascending order, and the reduction print areas corresponding to each printed page are arranged in ascending order according to the area order. Then the nth image number corresponding to the nth reduction print area. For example, the first reduction print area in the first printed page corresponds to image number 1, the second reduction print area corresponds to image number 2... and the nth reduction print area corresponds to image number n.

[0120] Finally, the output order of all images in the multi-page-in-one typesetting mode is obtained according to the area order and the image numbers corresponding to each reduction area. Among them, the output order of multiple images corresponding to each printing page can be obtained in sequence according to the area order of each reduction area in the printing page and the image numbers corresponding to each reduction area. Finally, the output order of multiple images corresponding to each printing page is integrated according to the order of the printing page to obtain the output order of all images.

[0121] For example, in a single-sided printing scenario, there are 17 pages of images, the number of rows is 3, the number of columns is 2, and the printing parameters are to print row by row from left to right. According to formula (1), the number of printed pages is 3, that is, three printed pages are required. Each side of each printed page includes 6 reduction areas, such as Figure 2 As shown in . Then the first printed page can correspond to the 6 images with area numbers 1-6, the second printed page can correspond to the 6 images with area numbers 7-12, and the third printed page can correspond to the 5 printed images with area numbers 13-17. The area order of each reduced print area on each printed page is: first row first column position a1 b1, first row second column position a1 b2, second row first column position a2b1, second row second column position a2b2, third row first column a3b1, third row second column position a3b2. Then in the first printed page, the first reduced print area a1 b1 corresponds to the image with image number 1, the second reduced print area a1 b2 corresponds to the image with image number 2... and the sixth reduced print area a3b2 corresponds to the image with image number 6. The same applies to the second and third printed pages.

[0122] After determining the image numbers corresponding to each reduction printing area, the output order of multiple pages of images can be obtained according to the order of the reduction printing areas and the image numbers of the images corresponding to the reduction printing areas. Specifically, when there are multiple pages of printing pages, the output order of multiple pages of images is obtained according to the order of printing pages 1 to printing pages n, and the order of reduction printing areas 1 to reduction printing areas m in each printing page.

[0123] In some embodiments, when the user selects the multi-page-in-one layout mode, each printed page needs to be cropped according to the reduction area. When the number of images is large, the above-mentioned sorting method will make it difficult to re-sort after cutting, which is time-consuming and labor-intensive. Based on this, an embodiment of the present invention provides another way of arranging images in the multi-page-in-one layout mode, so that the image numbers of the reduction areas at the same position between the printed pages conform to certain sorting rules. This eliminates the need for the user to manually sort each cropped reduction area. Specifically, for single-sided printing scenarios, the image numbers corresponding to the reduction areas at the same position in adjacent different printed pages can be arranged continuously. Then the mapping relationship between the area order n of each reduction area in the xth printed page and the image number f(n) is as shown in formula (5):

[0124] f(n)=f×n-f+x------(5)

[0125] Where f is the number of print pages (i.e., the number of prints required to print all images), n is the region order of the reduced print region in the x-th print page, x≤f. f(n) refers to the image number corresponding to the n-th region position in the x-th page, and f(n) is a positive integer ≥1.

[0126] n=t(i-1)+j--------------(6)

[0127] n=i+m(j-1)-----------(7)

[0128] Where n represents the area position (i.e., area order) of the i-th row and j-th column in the x-th page, i≤m,j≤t, m is the row number information in the layout setting information of the multi-page-in-one typesetting mode, and t is the column number information in the layout setting information of the multi-page-in-one typesetting mode. When the printing order of each image in each printed page is horizontal printing (i.e., printing row by row from left to right or from right to left) in the multi-page-in-one typesetting mode, the area order of each reduced print area is calculated using formula (6). When the printing order is vertical printing (i.e., printing column by column from top to bottom or from bottom to top), the area order of each reduced print area is calculated using formula (7). Among them, the printing order will affect the sorting rules of the area order in the multi-page-in-one typesetting mode. The printing order specifically refers to the output order of each image in each printed page by the image forming device in the multi-page-in-one typesetting mode. If the user sets the printing order of each image in each page to be printed from left to right, the sorting of the area order is also from left to right. If the user sets the printing order of each image in each page to be from top to bottom, the order of the regions is also from top to bottom. Therefore, the printing order will not affect the image number of the image corresponding to the reduced print region calculated in formula (5).

[0129] For the multi-page-in-one typesetting mode in the single-sided printing scenario, take 17 images as an example, and each printed page is reduced to 2×3 images. The printed page is divided into 6 reduced printing areas. The division result is as follows: Figure 2 As shown in . According to formula (1), a total of 3 printing pages are required. Then for the first printing page, x is 1. The user sets the printing order from left to right, so the position of the 6th reduction area of ​​the first printing page is Figure 2 The position of the reduced print area a3b2 shown in , that is, i = 3, j = 2. (Substituting i = 3, j = 2 into formula (6), the area order of the reduced print area is 6, and the corresponding image number is obtained according to formula (5): f (6) = 3 × 6-3 + 1 = 16.

[0130] When x=2, the 4th reduction area of ​​the second printed page is Figure 2 The image number corresponding to the position of the reduced print area a2b2 is: f(4)2=3×4-3+2=11. Thus, the area sequence of each reduced print area can be mapped to the image number, so as to obtain the image number corresponding to each reduced print area in each printed page.

[0131] Figure 3a to Figure 3c Schematic diagram of a printing page provided by an embodiment of the present invention. Figure 3a to Figure 3c As shown in , the image numbers corresponding to the reduced print areas at the same position of different printed pages are continuous for the three printed pages obtained by the above method. Figure 3a For the first printed page, Figure 3b For the second printed page, Figure 3c It is the third printed page. Among them, the sixth reduced print area a3b2 of the third printed page is a blank image. Therefore, the user can stack the three printed pages in order, and then cut the three printed pages uniformly at the same time to obtain 6 piles, and the image numbers of each pile from top to bottom are continuous. For example, the image numbers of the first pile located in the upper left are 1, 2, and 3 from top to bottom. The image numbers of the second pile located in the upper right are 4, 5, and 6. Then, the 6 piles obtained after cutting can be stacked in order from top to bottom. That is, according to the order of the reduced print area, the 6 piles are stacked in the order of upper left, upper right, middle left, middle right, lower left, and lower right, so as to obtain 17 images with continuous image numbers, without the need for users to manually sort after cutting, thereby improving the user experience.

[0132] For the multi-page-in-one printing scenario of double-sided printing, the image arrangement of the second side of each printed page needs to be adjusted accordingly to ensure that the image numbers on the front and back sides of the printed page correspond. The first image number corresponding to the first reduced print area on the first side of the printed page and the second image number corresponding to the second reduced print area on the second side of the printed page are arranged continuously. The area position of the first reduced print area on the first side is mirror-symmetrical to the area position of the second reduced print area on the second side. Figure 2 The first and second sides of the printed page are divided into 6 reduction printing areas. The division results of the first and second sides are as follows Figure 2 The first reduction area on the first side of the printed page is Figure 2 The location of the reduced print areas a1 and b1 shown in the figure. Figure 2 The mirror image of the reduction area a1 b1 in the image is the reduction area a1 b2. The location of the reduction area a1 b2 is the location of the second reduction area in the second side of the printed page. That is, the mirror image of the reduction area located at the leftmost side of the i-th row in the first side of the printed page is the reduction area located at the rightmost side of the i-th row in the second side of the printed page. Then, when the image number corresponding to the reduction area a1 b1 on the front of the first printed page is 1, the image number of the reduction area a1 b2 on the back of the first printed page is 2. Correspondingly, when the reduction area is cut off, the image with image number 1 is printed on the front, and the image with image number 2 is printed on the back. Then the image number corresponding to the reduction area a1 b1 on the front of the second printed page should be 3, and the image number corresponding to the reduction area a1 b2 on the back of the second printed page should be 4. Thus, after stacking the first printed page on top of the second printed page and cutting them, the effect of continuous stacked portrait numbers can be obtained (that is, after cutting the reduced print areas of the two printed pages together, two stacked reduced print papers are obtained, with the upper reduced print paper having portrait number 1 printed on the front and portrait number 2 printed on the back, and the lower reduced print paper having portrait number 3 printed on the front and portrait number 4 printed on the back).

[0133] When the number of printing surfaces is even, and all printed pages are filled with images without adding blank pages, the above printing effect can be achieved in the following manner. First, the image number of the image corresponding to each reduced print area is calculated according to formula (1) to formula (7). Then, for the printed surface on the back of the printed page, the image number of the nth column in the positive sequence is swapped with the image number of the nth column in the reverse sequence. Figure 3a Take the first page of the first print page as an example. If you print Figure 3bThe layout shown is used as the second side of the first printed page, then the back of image number 1 is image number 5, and the back of image number 4 is image number 2. It can be seen that the image numbers on the front and back sides do not correspond. Figure 3b The image numbers of each reduced print area in the first column are exchanged with the image numbers of each reduced print area in the second column, and the obtained Figure 4 Schematic diagram of the second side of the first printed page shown in Figure 4 As shown in the second side of the first printed page, Figure 3a As the first side of the first printed page, the back side of image number 1 is image number 2, and the back side of image number 4 is image number 5. At this time, the image numbers on the front and back sides correspond continuously.

[0134] Optionally, in some embodiments, a cutting indicator line may be added at the boundary of the cutting area in the multi-page-in-one typesetting mode to facilitate cutting by the user. Figure 5 A schematic diagram of a printing page provided by an embodiment of the present invention. Figure 5 As shown in the figure, the cutting guide line is Figure 5 The user can cut according to the dotted lines in the figure, which further enhances the user experience.

[0135] Step 104, print out each page of the portrait according to the output order.

[0136] In the normal output mode, the image forming device prints out multiple pages of images in the output order in the manner of one image per side of a printed page. In the multi-page-in-one and booklet output scenarios, one side of a printed page corresponds to multiple images, and different images are printed at different positions on the final printed paper.

[0137] Corresponding to the above-mentioned image sorting method, an embodiment of the present invention provides an image forming device. Figure 6 FIG. 1 is a schematic diagram of the structure of an image forming device provided by an embodiment of the present invention. Figure 6 As shown in , the image forming apparatus includes: an acquisition module 601 , a numbering module 602 , a processing module 603 and an execution module 604 .

[0138] The acquisition module 601 is used to acquire multiple pages of images input from several image sources, the image attributes of each page of the image, and the output mode of the multiple pages of images.

[0139] The numbering module 602 is used to determine the image number of each page of images according to a number of image sources and image attributes.

[0140] The processing module 603 is used to determine the output order of each page of the image according to the image number and the output mode.

[0141] The execution module 604 is used to print out each page of the portrait according to the output sequence.

[0142] Figure 6 The image forming apparatus provided in the illustrated embodiment can be used to implement the present invention. Figure 1-Figure 5 The technical solution of the method embodiment shown, its implementation principle and technical effects can be further referred to the relevant description in the method embodiment.

[0143] Figure 7 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention is shown in FIG. Figure 7 As shown, the electronic device may include at least one processor and at least one memory in communication with the processor, wherein the memory stores program instructions executable by the processor, and the processor calls the program instructions to execute the instructions of this specification. Figure 1-2 The illustrated embodiment provides a method for sorting portraits.

[0144] like Figure 7 As shown, the electronic device is in the form of a general computing device. The components of the electronic device may include but are not limited to: one or more processors 710, communication interface 720 and memory 730, and a communication bus 740 connecting different system components (including memory 730, communication interface 720 and processor 710).

[0145] The communication bus 740 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, a graphics acceleration port, a processor or a local bus using any of a variety of bus structures. For example, these architectures include but are not limited to the Industry Standard Architecture (ISA) bus, the Micro Channel Architecture (MAC) bus, the Enhanced ISA bus, the Video Electronics Standards Association (VESA) local bus, and the Peripheral Component Interconnection (PCI) bus.

[0146] Electronic devices typically include a variety of computer system readable media. These media can be any available media that can be accessed by the electronic device, including volatile and non-volatile media, removable and non-removable media.

[0147] The memory 730 may include a computer system readable medium in the form of a volatile memory, such as a random access memory (RAM) and / or a cache memory. The electronic device may further include other removable / non-removable, volatile / non-volatile computer system storage media. The memory 730 may include at least one program product having a set (e.g., at least one) of program modules configured to perform the functions of each embodiment of the present specification.

[0148] A program / utility having a set (at least one) of program modules may be stored in memory 730, such program modules including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment. The program modules generally perform the functions and / or methods of the embodiments described in this specification.

[0149] The processor 710 executes various functional applications and data processing by running the programs stored in the memory 730, such as implementing the Figure 1-4 The illustrated embodiment provides a method for sorting portraits.

[0150] The embodiment of the present specification provides a computer program product, the computer program product includes a computer program, when the computer program is executed by a processor, implements the execution of the present specification Figure 1-4 The illustrated embodiment provides a method for sorting portraits.

[0151] The embodiment of the present specification provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions, wherein the computer instructions enable the computer to execute the present specification. Figure 1-4 The illustrated embodiment provides a method for sorting portraits.

[0152] The above-mentioned computer-readable storage medium can adopt any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium can be, for example, - but not limited to - an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of computer-readable storage media include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (Read Only Memory; hereinafter referred to as: ROM), an erasable programmable read-only memory (Erasab le Programmab le ReadOnly Memory; hereinafter referred to as: EPROM) or flash memory, optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this document, a computer-readable storage medium can be any tangible medium containing or storing a program, which can be used by an instruction execution system, device or device or used in combination with it.

[0153] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0154] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of this specification. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, unless they are contradictory.

[0155] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In the description of this specification, the meaning of "plurality" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.

[0156] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, segment or portion of code that includes one or more executable instructions for implementing the steps of a custom logical function or process, and the scope of the preferred embodiments of this specification includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in reverse order depending on the functions involved, which should be understood by technicians in the technical field to which the embodiments of this specification belong.

[0157] The word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrases "if it is determined" or "if (stated condition or event) is detected" may be interpreted as "when it is determined" or "in response to determining" or "when detecting (stated condition or event)" or "in response to detecting (stated condition or event)", depending on the context.

[0158] It should be noted that the devices involved in the embodiments of this specification may include but are not limited to personal computers (PCs), personal digital assistants (PDAs), wireless handheld devices, tablet computers, mobile phones, MP3 displays, MP4 displays, etc.

[0159] In the several embodiments provided in this specification, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0160] In addition, each functional unit in each embodiment of this specification may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional units.

[0161] The above-mentioned integrated unit implemented in the form of a software functional unit can be stored in a computer-readable storage medium. The above-mentioned software functional unit is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a connector, or a network device, etc.) or a processor (Processor) to perform some steps of the method described in each embodiment of this specification. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory; hereinafter referred to as: ROM), random access memory (Random Access Memory; hereinafter referred to as: RAM), disk or optical disk and other media that can store program codes.

[0162] The above description is only a preferred embodiment of this specification and is not intended to limit this specification. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of this specification should be included in the scope of protection of this specification.

[0163] In this specification, the same or similar parts between the various embodiments can be referred to each other. In particular, for the device embodiment and the terminal embodiment, since they are basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the description in the method embodiment.

Claims

1. A method for sorting portraits, characterized in that: Applicable to image forming devices, including: Obtain multiple pages of images input from several image sources, image attributes of each page of the images, and an output mode of the multiple pages of images; Determining the image number of each page of images according to the image sources and the image attributes; Determining the output order of each page of images according to the image number and the output mode; Each page of the image is printed out according to the output sequence.

2. The method according to claim 1, characterized in that The portrait attributes include one or more combinations of the outer side of the front cover, the inner side of the front cover, the main text, the inner side of the back cover, and the outer side of the back cover.

3. The method according to claim 1, characterized in that Determining the image number of each page of images according to the plurality of image sources and the image attributes includes: Obtaining the total number of pages of the multiple-page portrait; Determine the portrait identification information of each page of portraits according to the portrait attributes; Sorting each page of portraits according to the sources of the portraits, the identification information of the portraits and the total number of pages; Each page of portraits is numbered according to the result of the sorting to obtain the portrait number of each page of portraits.

4. The method according to claim 1, characterized in that The image source is a single image source, and the image number of each page of images is determined according to the plurality of image sources and the image attributes, including: Obtaining the total number of pages of the multiple-page portrait; According to the image attributes of each page of the image corresponding to the image source and the total number of pages of the multiple pages of images, the image number of each page of the image corresponding to the image source is determined.

5. The method according to claim 1, characterized in that The image sources are at least two, and the image number of each page of images is determined according to the image sources and the image attributes, including: Determine the first arrangement order of each image source and the number of sub-pages of the image corresponding to each image source; wherein the sum of the number of sub-pages of the image corresponding to each image source is used as the total number of pages of the multiple-page image; For any image source, according to the image attributes of each image in the image source and the number of sub-pages of all images in the image source, determine the second arrangement order of each image corresponding to the image source; The image number of each page of images is determined based on the first arrangement order of each image source, the second arrangement order of all images in each image source and the total number of pages.

6. The method according to claim 1, characterized in that The output mode includes at least a printing mode and a typesetting mode, and the output order of each page of images is determined according to the image number and the output mode, including: The output order of each page of images is determined according to the printing mode, the typesetting mode and the image number of each image.

7. The method according to claim 6, characterized in that The layout mode is a multi-page-in-one layout mode, and the output order of each page of images is determined according to the printing mode, the layout mode and the image number of each image, including: Determine the number of pages to be printed; the number of pages to be printed is used to represent the number of sheets of paper required to print all the images; Divide the printing surface of each printing page into M reduction printing areas; wherein M is a positive integer greater than or equal to 2; Determining the image number of the image corresponding to each of the reduced print areas; The output order of each page of images is obtained according to the image number of each image corresponding to the reduced print area, the printing mode and the typesetting mode.

8. The method according to claim 7, characterized in that Determining the number of pages to be printed includes: Acquire the total number of pages of the multi-page portrait and the layout setting information corresponding to each of the printing pages in the multi-page-in-one typesetting mode; The number of pages to be printed is determined according to the total number of pages and the layout setting information.

9. The method according to claim 8, characterized in that The layout setting information includes row number information and column number information, and the printing surface of each printing page is divided into M reduction printing areas, including: The printing surface of each printing page is divided into M reduction printing areas according to the row number information and the column number information.

10. The method according to claim 7, characterized in that The step of determining the image number of the image corresponding to each of the reduced print areas includes: Determine the area position of each reduction area on the print surface of the print page; Determining the region order of each reduced print region in the print surface of the print page according to the M and the region position; The image number of the image corresponding to each reduced print area in each printing page is determined according to the number of printing pages and the area sequence.

11. The method according to claim 10, characterized in that The step of determining the image number of the image corresponding to each reduced print area in each printed page according to the number of printed pages and the area sequence includes: The image number of the image corresponding to each reduction print area is determined according to the predetermined mapping relationship between the area sequence of each reduction print area in each printing page and the image number and the number of printing pages.

12. The method according to claim 7, characterized in that The printing mode is a single-sided printing mode, and in different printing pages, the image numbers corresponding to the reduced print areas at the same position are arranged continuously.

13. The method according to claim 7, characterized in that The printing mode is a double-sided printing mode, and in each of the printed pages, the first image number corresponding to the first reduced printing area located on the first side of the printed page and the second image number corresponding to the second reduced printing area located on the second side of the printed page are arranged continuously; wherein the area position of the first reduced printing area in the first side and the area position of the second reduced printing area in the second side are mirror-symmetrical.

14. The method according to claim 1, characterized in that The output mode at least includes a typesetting mode. When the typesetting mode is a common output mode, determining the output order of each page of images according to the image number and the output mode includes: Obtaining output rules of the common output mode; the output rules include forward order output and reverse order output; If the output rule of the common output mode is positive order output, the output order of the multiple pages of portraits is in ascending order of portrait numbers; If the output rule of the common output mode is reverse output, the output order of the multiple pages of images is in descending order of the image numbers.

15. The method according to claim 1, characterized in that The output mode at least includes a typesetting mode, the typesetting mode is a booklet mode, and the total number of pages of the multiple-page portraits satisfies a first constraint condition, and the output order of each page of the portraits is determined according to the portrait numbers and the output mode, including: Arrange the plurality of pages of portraits in ascending order and in descending order according to the portrait numbers to obtain corresponding ascending order image groups and descending order image groups; The first image corresponding to the nth page in the positive order image group and the second image corresponding to the nth page in the reverse order image group are divided into one group to obtain multiple groups of image sets; wherein n≤total number of pages / 2; Arrange multiple sets of portraits according to preset sorting rules; The output order of the plurality of image sets is determined according to the output mode and the result of the arrangement.

16. The method according to claim 1, characterized in that The output mode at least includes a typesetting mode, the typesetting mode is a booklet mode, and the total number of pages of the multiple-page portrait does not satisfy the first constraint condition, and the output order of each page of the portrait is determined according to the portrait number and the output mode, including: Arrange the plurality of pages of portraits in ascending order and in descending order according to the portrait numbers to obtain corresponding ascending order image groups and descending order image groups; Inserting a blank image after the last image in the normal order image group, and inserting a blank image before the first image in the reverse order image group, so that the total number of pages in the normal order image group and the total number of pages in the reverse order image group both meet the first constraint condition; The third image corresponding to the nth page in the positive sequence image group after the blank image is inserted and the fourth image corresponding to the nth page in the reverse sequence image group after the blank image is inserted are grouped into one group to obtain a plurality of image sets; Arrange multiple sets of portraits according to preset sorting rules; The output order of the plurality of image sets is determined according to the output mode and the result of the arrangement.

17. An image forming device, characterized in that: include: An acquisition module, used for acquiring multiple pages of images input from several image sources, image attributes of each page of images, and an output mode of the multiple pages of images; A numbering module, used to determine the image number of each page of images according to the image sources and the image attributes; A processing module, used for determining the output order of each page of images according to the image number and the output mode; The execution module is used to print out each page of the image according to the output sequence.

18. An electronic device, comprising: at least one processor; as well as at least one memory in communication with the processor, wherein: The memory stores program instructions executable by the processor, and the processor can execute the method according to any one of claims 1 to 16 by calling the program instructions.

19. A computer-readable storage medium storing computer instructions, wherein the computer instructions enable the computer to execute the method according to any one of claims 1 to 16.

20. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 16 is implemented.

Citation Information

Patent Citations

  • Method for multiple data origin printing, computer readable media and data processing system

    CN101017426A

  • Image forming apparatus and method, image forming system

    CN102957825A

  • Image Processing Device, Image Processing Method, And Image Processing Program

    CN105205506A

  • Control apparatus and program

    CN108621613A

  • Image formation device, control method, control programe and programe recording medium

    CN1325057A

Cited By

  • Image insertion control method and device and storage medium

    CN120723186A