A method for sorting images, an image forming apparatus, a device, and a storage medium.
Patent Information
- Application Number
- CN202411394498.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-30
- Publication Date
- 2026-09-01
- Estimated Expiration
- 2044-09-30
AI Technical Summary
然而,相关技术存在打印输出的画像顺序不符合用户打印需求的情况,例如,在一些场景下,当用户在扫描完成后补充一些额外的画像时将会导致画像顺序错乱,进而导致最终输出的画像不符合用户的预期
[0067]第五方面,本发明实施例提供一种计算机程序产品,所述计算机程序产品包括计算机程序,当所述计算机程序被处理器执行时,实现第一方面所述的方法。
Smart Images

Figure CN119322595B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of image forming apparatus technology, and in particular to an image sorting method, an image forming apparatus, a device, and a storage medium. Background Technology
[0002] In image forming apparatuses, the images used for copying largely originate from the scanned originals. After scanning the original, the apparatus caches the images in the scanning order. Finally, the images are printed out according to the cached order. However, current technology suffers from issues where the printed image order does not meet the user's printing requirements. For example, in some scenarios, when the user adds extra images after scanning, the image order may become disordered, resulting in a final output that does not meet the user's expectations. Therefore, ensuring that the printing quality meets the user's needs is a pressing problem that needs to be solved. Summary of the Invention
[0003] In view of this, this application provides a portrait sorting method, an image forming apparatus, a device, and a storage medium. By reordering the received multi-page portraits, the problem of portrait disorder can be overcome, and the needs of users for different printing effects can be met.
[0004] In a first aspect, embodiments of the present invention provide an image sorting method, applied to an image forming apparatus, comprising:
[0005] Obtain multiple pages of images from several image sources, the image attributes of each page, and the output mode of the multiple pages of images;
[0006] Based on the aforementioned image sources and image attributes, determine the image number for each page of images;
[0007] The output order of each page of images is determined based on the image number and the output mode.
[0008] Each page of the image is printed out according to the output order.
[0009] In one possible implementation, the image attributes include one or more combinations of the outer cover, inner cover, body text, inner back cover, and outer back cover.
[0010] In one possible implementation, determining the image number for each page of images based on several of the image sources and the image attributes includes:
[0011] Obtain the total number of pages in the multi-page image;
[0012] The image identification information for each page of images is determined based on the image attributes.
[0013] The images on each page are sorted according to the aforementioned sources of images, the image identification information of each image, and the total number of pages;
[0014] Based on the sorting results, each page of images is numbered to obtain the image number for each page.
[0015] In one possible implementation, the image source is a single image source, and determining the image number for each page of images based on the plurality of image sources and the image attributes includes:
[0016] Obtain the total number of pages in the multi-page image;
[0017] Based on the image attributes of each page of the image source and the total number of pages of the multi-page image, determine the image number of each page of the image source.
[0018] In one possible implementation, the image sources are at least two, and determining the image number for each page of images based on the image sources and the image attributes includes:
[0019] Determine the first arrangement order of each image source and the number of subpages of the image corresponding to each image source; wherein, the sum of the number of subpages of the image corresponding to each image source is taken as the total number of pages of the multi-page image.
[0020] For any image source, a second arrangement order of the images corresponding to the image source is determined based on the image attributes of each image in the image source and the number of subpages of all images in the image source.
[0021] The image number for each page is determined based on the first arrangement order of the images from each image source, the second arrangement order of all images from each image source, and the total number of pages.
[0022] In one possible implementation, the output mode includes at least a print mode and a layout mode, and determining the output order of each page of images based on the image number and the output mode includes:
[0023] The output order of each page of images is determined based on the printing mode, the layout mode, and the image number of each image.
[0024] In one possible implementation, the layout mode is a multi-page layout mode, and determining the output order of each page of images based on the printing mode, the layout mode, and the image number of each image includes:
[0025] Determine the number of pages to be printed; the number of pages to be printed represents the amount of paper required to print all the images.
[0026] Each printed page is divided into M reduction areas; where M is a positive integer greater than or equal to 2.
[0027] Determine the image number corresponding to each of the aforementioned reduced-size areas;
[0028] The output order of each page of images is obtained based on the image number corresponding to each of the reduced-size areas, the printing mode, and the layout mode.
[0029] In one possible implementation, determining the number of pages to print includes:
[0030] Obtain the total number of pages in the multi-page image and the layout settings information for each printed page in the multi-page combined layout mode;
[0031] The number of pages to be printed is determined based on the total number of pages and the layout information.
[0032] In one possible implementation, the layout information includes row number information and column number information, and dividing the print surface of each printed page into M reduction areas includes:
[0033] Based on the row number information and the column number information, the printing surface of each printed page is divided into M reduction areas.
[0034] In one possible implementation, determining the image number corresponding to each of the reduced-size areas includes:
[0035] Determine the location of each reduced area on the printed surface of the page;
[0036] The order of each reduced-size area in the printed surface of the printed page is determined based on M and the area position.
[0037] The image number corresponding to each reduced area in each printed page is determined based on the number of printed pages and the order of the areas.
[0038] In one possible implementation, determining the image number corresponding to each reduced-size area in each printed page based on the number of printed pages and the area order includes:
[0039] Based on the predetermined mapping relationship between the regional order of each reduced-size area in each printed page and the image number, as well as the number of printed pages, the image number corresponding to each reduced-size area is determined.
[0040] In one possible implementation, the printing mode is a single-sided printing mode, in which the image numbers corresponding to the same reduced-size area are arranged consecutively in different printed pages.
[0041] In one possible implementation, the printing mode is a double-sided printing mode, wherein in each printed page, the first image number corresponding to the first shrinkage area on the first side of the printed page and the second image number corresponding to the second shrinkage area on the second side of the printed page are arranged consecutively; wherein the position of the first shrinkage area on the first side and the position of the second shrinkage area on the second side are mirror-symmetrical.
[0042] In one possible implementation, the output mode includes at least a layout mode. When the layout mode is a normal output mode, determining the output order of each page of images based on the image number and the output mode includes:
[0043] Obtain the output rules for the normal output mode; the output rules include forward output and reverse output.
[0044] If the output rule of the normal output mode is ascending order, then the output order of the multi-page portraits is in ascending order of portrait number;
[0045] If the output rule of the normal output mode is reverse output, then the output order of the multi-page portraits is in descending order of the portrait number.
[0046] In one possible implementation, the output mode includes at least a layout mode, wherein the layout mode is a booklet mode, and the total number of pages of the multi-page portrait satisfies a first constraint condition. Determining the output order of each page of the portrait based on the portrait number and the output mode includes:
[0047] The multi-page images are arranged in ascending and descending order according to their image numbers to obtain corresponding ascending and descending image groups.
[0048] The first image corresponding to page n in the forward-order image group and the second image corresponding to page n in the reverse-order image group are grouped together to obtain multiple image sets; wherein, n ≤ total number of pages / 2;
[0049] Multiple sets of images are arranged according to a preset sorting rule;
[0050] The output order of the multiple sets of images is determined based on the output mode and the result of the arrangement.
[0051] In one possible implementation, the output mode includes at least a layout mode, which is a booklet mode, and the total number of pages of the multi-page portrait does not satisfy the first constraint condition. Determining the output order of each page portrait based on the portrait number and the output mode includes:
[0052] The multi-page images are arranged in ascending and descending order according to their image numbers to obtain corresponding ascending and descending image groups.
[0053] A blank image is inserted after the last image in the forward-order image group and before the first image in the reverse-order image group, so that the total number of pages in the forward-order image group and the total number of pages in the reverse-order image group both satisfy the first constraint condition;
[0054] The third image on page n of the forward-order image group after inserting the blank image and the fourth image on page n of the reverse-order image group after inserting the blank image are grouped together to obtain multiple image sets;
[0055] Multiple sets of images are arranged according to a preset sorting rule;
[0056] The output order of the multiple sets of images is determined based on the output mode and the result of the arrangement.
[0057] In a second aspect, embodiments of the present invention provide an image forming apparatus, comprising:
[0058] The acquisition module is used to acquire multiple pages of portraits input from several portrait sources, the portrait attributes of each page of portraits, and the output mode of the multiple pages of portraits;
[0059] The numbering module is used to determine the image number of each page of images based on the aforementioned image sources and image attributes;
[0060] The processing module is used to determine the output order of each page of images based on the image number and the output mode;
[0061] The execution module is used to print each page of the image according to the output order.
[0062] Thirdly, embodiments of the present invention provide an electronic device, comprising:
[0063] At least one processor; and
[0064] At least one memory communicatively connected to the processor, wherein:
[0065] The memory stores program instructions that can be executed by the processor, and the processor can execute the method described in the first aspect by calling the program instructions.
[0066] Fourthly, embodiments of the present invention provide a computer-readable storage medium storing computer instructions that cause the computer to perform the method described in the first aspect.
[0067] Fifthly, embodiments of the present invention provide a computer program product, the computer program product including a computer program, which, when executed by a processor, implements the method described in the first aspect.
[0068] In this embodiment of the invention, after obtaining multiple pages of images, the multiple pages of images are reordered according to the image attributes of the images, and the images are output based on the reordering result and the output mode selected by the user, thereby avoiding the problem of image disorder. Attached Figure Description
[0069] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0070] Figure 1 A flowchart of a portrait sorting method provided in an embodiment of the present invention;
[0071] Figure 2 This is a schematic diagram of a reduced-size printing area provided in an embodiment of the present invention;
[0072] Figure 3a A schematic diagram of a printed page provided for an embodiment of the present invention;
[0073] Figure 3b A schematic diagram of another printed page provided in an embodiment of the present invention;
[0074] Figure 3c A schematic diagram of another printed page provided in an embodiment of the present invention;
[0075] Figure 4 A schematic diagram of another printed page provided in an embodiment of the present invention;
[0076] Figure 5 A schematic diagram of another printed page provided in an embodiment of the present invention;
[0077] Figure 6 This is a schematic diagram of the structure of an image forming apparatus provided in an embodiment of the present invention;
[0078] Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0079] To better understand the technical solution of this application, the embodiments of this application will be described in detail below with reference to the accompanying drawings.
[0080] It should be understood that the described embodiments are merely some, not all, of the embodiments in this application. All other embodiments obtained by those skilled in the art based on the embodiments in this application without inventive effort are within the scope of protection of this application.
[0081] The terminology used in the embodiments of this application is for the purpose of describing particular embodiments only and is not intended to be limiting of this application. The singular forms “a,” “the,” and “the” used in the embodiments of this application and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise.
[0082] It should be understood that the term "and / or" used in this article is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. Additionally, the character " / " in this article generally indicates that the preceding and following related objects have an "or" relationship.
[0083] In photocopying scenarios, the images used in a photocopying job by an image forming apparatus are mostly obtained by scanning the original document itself. The images are generally arranged in the order they were scanned from the original. However, when supplementary images are inserted, the arrangement of the images can become disordered, resulting in the final print quality not meeting the user's expectations.
[0084] For example, in a duplex copying scenario, a user copies three pages of original text, resulting in a six-page scanned image: cover, pages 1-4 of the main text, and back cover. When the user inserts a blank image inside the cover using the image forming device, the image order changes from: cover, page 1 of the main text, page 2 of the main text, page 3 of the main text, page 4 of the main text, back cover, to: inside the cover (the inserted blank image inside the cover), cover, page 1 of the main text, page 2 of the main text, page 3 of the main text, page 4 of the main text, back cover. This demonstrates that when the image order is incorrect, the final printed result differs from the user's desired effect, leading to a poor user experience.
[0085] Therefore, the correctness of the image order is crucial for ensuring accurate image output. Based on this, embodiments of the present invention provide an image sorting method, an image forming apparatus, a device, and a storage medium. By reordering images through numbering, the output image order conforms to the user's expectations. For copying operations, the image reordering step can be implemented in the copying module of the image forming apparatus. However, since the image sources for copying include not only images obtained through flatbed scanning and ADF scanning, but also images from other sources, such as images sent from a PC, images merged from other image forming apparatuses on the same network segment, etc., the image output method in this embodiment can be applied to the copying module of the image forming apparatus or to other image-output modules within the image forming apparatus, thereby enabling image reordering from all sources.
[0086] Figure 1 This is a flowchart illustrating a portrait sorting method provided in an embodiment of the present invention. Figure 1 As shown, the method includes:
[0087] Step 101: Obtain multiple pages of images from several image sources, the image attributes of each page, and the output mode of the multiple pages of images.
[0088] In a copying scenario, the image formed by the image forming apparatus primarily originates from its own scanning module. The user places a multi-page original document in the scanning area of the image forming apparatus and sets the output mode before issuing a copy job. Output modes can include standard copy output, booklet mode, and multi-page combined layout mode. Upon receiving the copy job, the image forming apparatus scans the multi-page original document in the scanning area to obtain the corresponding multi-page images. The image forming apparatus determines the image attributes of each page based on the scanning order and the original document composition elements set by the user when issuing the job. These composition elements include: cover, body, and back cover. In a duplex printing scenario, the cover is further divided into the outer and inner sides. The back cover is also divided into the outer and inner sides. When a user issues a duplex copy job, if the user sets the original document composition elements to cover + body + back cover, the image forming apparatus will use the image of the front of the first scanned page as the outer cover and the image of the back of the first page as the inner cover. The image on the front of the last page of the original is used as the inside of the back cover, and the image on the back of the last page is used as the outside of the back cover. If the user issues a single-sided copy job and sets the original composition elements to cover + body + back cover, the image forming device will use the image of the first scanned page of the original as the cover and the image of the last page as the back cover. The user selects the original composition elements according to the actual situation of the original, and the image forming device then obtains the image attributes of each page based on the original composition elements and the scanning order of the original.
[0089] Furthermore, the image forming apparatus can also receive images transmitted from other image sources (such as mobile phones, computers, other image forming apparatuses, and other smart terminal devices).
[0090] The aforementioned image attributes correspond to the constituent elements of the original artwork. In double-sided printing, image attributes can include the outer cover, inner cover, body text, outer back cover, and inner back cover. In single-sided printing, image attributes can include the cover, body text, and back cover. Therefore, in some scenarios, there may be cases where there is no cover and back cover, only body text; cases where there is only a cover and body text, but no back cover; cases where there is a back cover and body text, but no cover; cases where there is a cover, body text, and back cover; and cases where there is only a cover and back cover, but no body text, etc.
[0091] In single-sided copying scenarios where the original document is single-sided, the image forming device typically designates the first scanned page as the cover, the second scanned page as page 1 of the main text, the third scanned page as page 2 of the main text, and so on, with the last scanned page designated as the back cover. Therefore, for single-sided copying, the resulting multi-page image attributes are: outer cover, main text, and outer back cover. For double-sided copying scenarios, the resulting multi-page image attributes are: outer cover, inner cover, main text, inner back cover, and outer back cover. The main text includes page 1, page 2, and so on, up to page n.
[0092] Step 102: Determine the image number for each page of images based on the source and attributes of the images.
[0093] After determining the image attributes of each page's image, a unique image number can be assigned to each page based on these attributes. Specifically, the total number of pages across multiple images can be obtained first. When the image source is singular, the number of images contained within that source is the total number of pages. When the image source is multiple, the total number of pages is the sum of the number of images contained within each source. Then, the image identification information for each page is determined based on the image attributes. For an image whose attribute is the outer cover, its image identification information can be designated as COVER_1. For an image whose attribute is the inner cover, its image identification information can be designated as COVER_2. For an image whose attribute is the first page of the main text, its image identification information can be designated as CONTEXT_1.
[0094] Then, based on the sources of the portraits, the identification information of each portrait, and the total number of pages, the portraits on each page can be sorted. And based on the sorting results, each page of portraits can be numbered to obtain a portrait number for each page.
[0095] In some embodiments, when the image source is a single image source, the image number of each page of the image source is determined directly based on the image attributes of each page of the image source and the total number of pages of the multi-page image. Optionally, the range of image numbers can be determined based on the total number of pages of the multi-page image. If the total number of pages is m, then the range of image numbers is 1 to m. Then, based on the image attributes, the multi-page images corresponding to the image source can be sorted in the order of cover, body, and back cover. For single-sided copying scenarios, the user-defined original composition elements are cover + body + back cover. The sorting result is: cover, body page 1 to body page n, back cover, where the total number of pages m is the number of body pages + cover + back cover, i.e., m = n + 2. For double-sided copying scenarios, the user-defined original composition elements are cover + body + back cover. The sorting result is: outer cover, inner cover, pages 1 to n of the main text, inner back cover, and outer back cover. The total number of pages m is the number of pages of the main text + outer cover + inner cover + outer back cover + inner back cover, i.e., m = n + 4.
[0096] After sorting, each page of the image can be numbered sequentially according to the sorting results to obtain the image number for each page. For example, in a single-sided copying scenario, the total number of pages m is 4, meaning a total of 4 images. After sorting according to the image attributes, the sorting result is: COVER_1 (page 1, i.e., cover), CONTEXT_1 (page 2, i.e., page 1 of the main text), CONTEXT_2 (page 3, i.e., page 2 of the main text), and COVER_4 (page 4, i.e., back cover). That is, cover + two pages of main text + back cover. At this point, the image number for each sorted image is defined sequentially, so the image number for COVER_1 is 1. The image number for CONTEXT_1 is 2. The image number for CONTEXT_2 is 3. The image number for COVER_4 is 4. Optionally, the step of numbering the images can be specifically implemented by standardizing the filenames of the images. Standardization specifically means unifying the prefix of the filenames of multiple pages of images, with only the numbers in the filename suffix being different and consecutive. The numbers in the filename suffix are the image numbers of the images. In scenarios with a cover, back cover, and main text, the image identification information for each image can be determined first. Then, the images can be renamed based on this identification information. For example, after standardizing the four images mentioned above, the filename for page 1 (the cover) changes from COVER_1 to PREFIX_1, page 2 (page 1 of the main text) changes from CONTEXT_1 to PREFIX_2, page 3 (page 2 of the main text) changes from CONTEXT_2 to PREFIX_3, and page 4 (the back cover) changes from COVER_4 to PREFIX_4. Sorting the four images by filename in ascending order results in: PREFIX_1, PREFIX_2, PREFIX_3, PREFIX_4. The suffix number at the end of the renamed image filenames is the image number. This standardization process facilitates image sorting and avoids sorting problems caused by inconsistent filename prefixes.
[0097] In some embodiments, when there are at least two image sources, it is necessary to determine the order of the image sources. Then, the images corresponding to each image source are sorted separately, on a per-source basis. Specifically, the first arrangement order of the image sources and the number of subpages of the images corresponding to each image source are first determined. The sum of the number of subpages of the images corresponding to each image source equals the total number of pages. The first arrangement order of the image sources is determined according to the user's settings. When the user does not set the arrangement order of the image sources, the first arrangement order of the image sources is determined by the order in which the images are sent to the image forming apparatus. For example, there are three image sources: A, B, and C. A contains 2 pages of images, B contains 1 page of images, and C contains 3 pages of images. The user sets the image source arrangement order to B first, then C, and finally A. Then the first arrangement order of the three image sources is: B, C, A. The total number of pages m = 2 + 1 + 3 = 6.
[0098] For any image source, the second arrangement order of the images corresponding to that image source is determined based on the image attributes of each image in the image source and the number of subpages of all images in the image source. This step is the same as the step described above for determining the order of multiple pages of images in a single image source scenario. Finally, the image number of each page's image is determined based on the first arrangement order of the image sources, the second arrangement order of all images in each image source, and the total number of pages. For example, if there are 10 pages in total and three image sources, A, B, and C, where A contains three images arranged by image attributes as a, b, and c; B contains four images arranged by image attributes as d, e, f, and g; and C contains three images arranged by image attributes as h, i, and j, the arrangement order of the three image sources is C, A, B. Therefore, the image number is initially determined to be within the range of 0-10 based on the total number of pages (10 pages). Then, based on the first arrangement of the portrait sources, the three portraits from source C are placed at the beginning, the three portraits from source A are placed in the middle, and the four portraits from source B are placed at the end. Combining this with the second arrangement of the portraits, the order of the 10 pages of portraits is: Source C (h, i, j), Source A (a, b, c), Source B (d, e, f, g). After numbering the portraits consecutively in this order, the portrait numbers for each page are: h (portrait number 1), i (portrait number 2), j (portrait number 3), a (portrait number 4), b (portrait number 5), c (portrait number 6), d (portrait number 7), e (portrait number 8), f (portrait number 9), g (portrait number 10).
[0099] Step 103: Determine the output order of the multi-page portraits based on the portrait number and output mode.
[0100] The output modes include print mode and layout mode. Print mode specifically includes single-sided printing mode and double-sided printing mode. Layout modes include multi-page layout mode, normal output mode, and booklet mode. Multi-page layout mode is used to represent multiple images printed on one page (it should be noted that this multi-page layout mode is a general term for N-page layout modes; different N correspond to different multi-page layout modes, such as N=2, which is a two-page layout mode, representing two images printed on one page; N=4, which is a four-page layout mode, representing four images printed on one page; and N=8, which is an eight-page layout mode, representing eight images printed on one page). Normal output mode means one image is printed on one page. Booklet mode can print two images on one side of the paper and is double-sided printing. After printing, fold along the junction of the two images printed on one side to obtain a booklet that can be turned over.
[0101] Then, the output order of each page of images can be determined based on the print mode, layout mode, and the image number of each image. The output order refers to the printing order of the multiple pages of images; the image number only serves as identification information and does not necessarily indicate the order in which the pages are printed. The output order of multiple pages of images is primarily determined by the print mode and layout mode. When the user selects the normal output mode, the output rules set by the user for the normal output mode can also be obtained. If the output rule for the normal output mode is ascending order, the multiple pages of images can be printed in ascending order of image number. If the output rule for the normal output mode is descending order, the multiple pages of images can be printed in descending order of image number.
[0102] When a user sets the layout mode to booklet mode, the corresponding printing mode defaults to double-sided printing. Furthermore, since two images need to be printed on one side of the paper in a booklet scenario, in double-sided printing mode, four images are printed on both sides of a single sheet of paper. Therefore, it is necessary to specifically determine whether the total number of pages of images satisfies the first constraint condition to determine whether blank images need to be inserted to make up the total number of pages to satisfy the first constraint condition. Specifically, since four images need to be printed on both sides of a single sheet of paper in this scenario, the first constraint condition can be implemented as whether the total number of pages is a multiple of 4. Specifically, if the total number of pages is a multiple of 4, no blank images need to be inserted. The multiple pages of images can be first arranged in ascending and descending order according to their image numbers, resulting in ascending and descending image groups. Then, the first image corresponding to page n in the ascending image group and the second image corresponding to page n in the descending image group are grouped together, resulting in multiple image sets, where n ≤ total number of pages / 2. By changing the value of n in ascending order from 1 to 2 (total page number / 2), n image sets can be obtained. These sets are then arranged according to a preset sorting rule. This rule can be implemented as printing from the center of the booklet outwards, starting with the image on the middle page and then expanding towards the front and back covers. Based on this rule, the output order of the image sets can be determined. For example, the image set with n=1 is placed last in the printing order, while the image set with the maximum value of n is placed first. Finally, the output order of the image sets is determined based on the output pattern and the arrangement results.
[0103] For example, there are 8 pages of images (i.e., a total of 8 pages), numbered 1 to 8. Since 8 is a multiple of 4, no blank images need to be inserted. The forward-order image set is: images numbered 1 to 8. The reverse-order image set is: images numbered 8 to 1. The value of n is 1 to 4. Therefore, following the values of n from 1 to 4, we can obtain four sets of images: First set: the first image in the forward-order set (image number 1) and the first image in the reverse-order set (image number 8). Second set: the second image in the forward-order set (image number 2) and the second image in the reverse-order set (image number 7). Third set: the third image in the forward-order set (image number 3) and the third image in the reverse-order set (image number 6). The fourth group consists of the fourth image in the forward-order image group (image number 4) and the fourth image in the reverse-order image group (image number 5). Finally, according to the booklet's preset sorting rules, the images are sorted in reverse order to obtain the following arrangement of multiple image sets: Group 4, Group 3, Group 2, Group 1. Based on this arrangement, the output order of the multiple pages of images is: Image number 4, Image number 5, Image number 3, Image number 6, Image number 2, Image number 7, Image number 1, Image number 8.
[0104] For printing scenarios where the total number of pages does not meet the first constraint (i.e., the total number of pages is not a multiple of 4), the number of blank images to be added is determined. This can be done by first calculating the remainder after dividing the total number of pages by 4. Subtracting the remainder from 4 gives the number of blank images to be added. Then, the images on the multiple pages are numbered in ascending and descending order to obtain ascending and descending image groups respectively. Next, a corresponding number of blank images are inserted after the last image in the ascending image group, and a corresponding number of blank images are inserted before the first image in the descending image group, thus ensuring that the total number of pages in both the ascending and descending image groups is a multiple of 4, satisfying the first constraint. Finally, the third image on the nth page of the ascending image group after inserting blank images and the fourth image on the nth page of the descending image group after inserting blank images are grouped together, resulting in multiple image sets. These multiple image sets are then arranged according to a preset sorting rule, and the output order of the multiple image sets is determined based on the output mode and the sorting result.
[0105] For example, consider a single image source containing 6 pages of images (total page count 6), with image numbers 1 through 6. Since 6 is not a multiple of 4, 2 blank images need to be inserted. Specifically, blank image 1 and blank image 2 are inserted after the last image in the forward-order image group (image number 6). Blank image 3 and blank image 4 are inserted before the first image in the reverse-order image group (image number 6). The forward-order image group then becomes: images numbered 1 through 6, blank image 1, blank image 2. The reverse-order image group becomes: blank image 3, blank image 4, images numbered 6 through 1. After inserting the 2 blank images, the total page count for both the forward and reverse-order image groups is 8, so n can take values from 1 to 4. Therefore, following the values of n from 1 to 4, four image sets can be obtained: The first set: the first image in the forward-order image group (image number 1) and the first image in the reverse-order image group (blank image 3). The second group consists of the second image from the forward-order image group (image number 2) and the second image from the reverse-order image group (blank image 4). The third group consists of the third image from the forward-order image group (image number 3) and the third image from the reverse-order image group (image number 6). The fourth group consists of the fourth image from the forward-order image group (image number 4) and the fourth image from the reverse-order image group (image number 5). Finally, according to the preset sorting rules of the booklet, the images are sorted in reverse order to obtain the following arrangement of multiple image sets: Group 4, Group 3, Group 2, Group 1. Based on the arrangement of the multiple image sets, the output order of the multi-page images is: Image number 4, Image number 5, Image number 3, Image number 6, Image number 2, Blank image 4, Image number 1, and Blank image 3.
[0106] In some embodiments, for multi-page layouts, multiple images need to be scaled down on a single page. Therefore, the number of pages to be printed is determined first, representing the amount of paper required to print all images. Then, the printable surface of each page is divided into M scaling areas, each corresponding to one image. The number of scaling areas on each printable surface is the number of images printed on that surface. For single-sided printing, each page has only one printable surface. For double-sided printing, each page has two printable surfaces, corresponding to the front and back of the paper respectively. Here, M is a positive integer greater than or equal to 2. Next, the image number corresponding to each scaling area is determined. The image corresponding to a scaling area refers to the image printed on that scaling area. The range of image numbers for each printable page is calculated based on the number of printable pages. For example, if the first page scales down 2*3 images, the image number range for the first page is 1 to 6. Finally, based on the image numbers corresponding to the scaling areas, the printing mode, and the layout mode, the output order of the images on each page is obtained.
[0107] Specifically, the total number of multi-page images and the layout settings for each printed page in the multi-page layout mode can be obtained first. When selecting the multi-page layout mode, the user needs to set the number of images printed on each printing surface as the layout settings. This specifically includes the number of images printed on each printing surface. The layout settings can also include row number information m and column number information t, which can be used to calculate the number of images printed on one page. Here, row number information m indicates that m rows of images are printed on one side of the printed page, and column number information t indicates that t columns of images are printed on one side of the printed page. For single-sided printing, each sheet of paper will have m×t images printed. Therefore, in a single printed page, each row will have t images printed, and each column will have m images printed. For double-sided printing, one side of the paper will have m×t images printed, and both sides of a single sheet of paper will have a total of m×t×2 images printed. The image forming device obtains this layout settings information.
[0108] In some embodiments, the user can manually input the values of m and t respectively. Alternatively, the image forming apparatus displays options such as four-page-to-one, six-page-to-one, eight-page-to-one, and sixteen-page-to-one. After the user selects a multi-page-to-one option, the image forming apparatus can further display multiple different reduction layouts. For example, after the user selects the six-page-to-one option, the image forming apparatus displays two reduction layouts: a 2×3 layout (i.e., m=2, t=3) and a 3×2 layout (i.e., m=3, t=2), and displays the corresponding preview effects. 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] Then, the number of pages to be printed can be determined based on the total number of pages and the layout information. The number of pages to be printed, f, represents the amount of paper required to print all the images, and f can be calculated using formula (1):
[0110]
[0111] Where N is the total number of pages in the multi-page portrait, m is the number of rows in the layout settings of the multi-page combined layout mode, and t is the number of columns in the layout settings of the multi-page combined layout mode. When the value of f calculated by formula (1) is a non-integer containing decimals, a scientific notation method of rounding up to the nearest whole number can be used to obtain an integer value without decimal parts. Specifically, rounding up to the nearest whole number means that when the value of f contains decimals, regardless of the decimal part, the integer part is incremented by one and the decimal part is removed. For example, if the calculated value of f is 6.2, then the decimal part of 0.2 is removed, and the integer part of 6 is incremented by one, so the final value of f is 7.
[0112] Next, determine the location of each shrinkage area on the printed page. Then, determine the order of the shrinkage areas on the printed page based on the number M of shrinkage areas and their corresponding locations. After determining the order of each shrinkage area, determine the image number corresponding to each shrinkage area based on the number of printed pages and the area order. That is, the image number of the image printed on the shrinkage area.
[0113] This can be achieved by determining the image number corresponding to each shrinkage area on each printed page, based on a pre-defined mapping relationship between the region order of each reduced area on each printed page and the image number, as well as the number of printed pages. Specifically, the range of image numbers corresponding to each printed page can be determined first, i.e., the starting and ending image numbers for each printed page can be determined. For the x-th printed page, its starting image number is denoted by F(x). 起 This means that F(x) can be calculated using formula (2). 起 The final image number is represented by F(x). 终 F(x) can be calculated using formula (3). 终 The number of reduced printing areas M can be obtained using 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 areas in the print area of a single printed page; x refers to the nth printed 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 final portrait number is F(1) 终 =1×6=6, so the image numbering range for all images on the first printed page is 1 to 6. When x=2, the starting image number for the second printed page is F(2). 起 = (2-1)×6+1=7, the final portrait number is F(2) 综 =2×6=12, so the range of portrait numbers for all portraits on the second printed page is 7 to 12.
[0119] Then, the image number corresponding to each shrink-up area can be determined according to the regional order of the shrink-up areas in the printed page and the starting and ending image numbers of the printed page. Specifically, multiple image numbers within the range of image numbers corresponding to each printed page are arranged in ascending order, and the shrink-up areas corresponding to each printed page are arranged in ascending order of regional order. Therefore, the nth image number corresponds to the nth shrink-up area. For example, the first shrink-up area in the first printed page corresponds to image number 1, the second shrink-up area corresponds to image number 2, and so on, with the nth shrink-up area corresponding to image number n.
[0120] Finally, the output order of all images in the multi-page layout mode is obtained based on the region order and the image number corresponding to each reduced-size region. Specifically, the output order of multiple images within each printed page can be obtained by sequentially determining the region order of each reduced-size region and the image number corresponding to each reduced-size region. Finally, the output order of multiple images corresponding to each printed page is integrated according to the order of the printed pages to obtain the output order of all images.
[0121] For example, in a single-sided printing scenario, there are 17 pages of images, with 3 rows and 2 columns, and the printing parameters are left-to-right line-by-line printing. According to formula (1), the number of pages to be printed is 3, meaning three printed pages are required. Each side of each printed page includes 6 reduction areas, such as... Figure 2 As shown in the diagram, the first printed page corresponds to the six images in areas 1-6, the second printed page corresponds to the six images in areas 7-12, and the third printed page corresponds to the five images in areas 13-17. The order of the reduced-size areas on each printed page is as follows: first row, first column, position a1 b1; first row, second column, position a1 b2; second row, first column, position a2 b1; second row, second column, position a2 b2; third row, first column, position a3 b1; third row, second column, position a3 b2. Therefore, in the first printed page, the first reduced-size area a1 b1 corresponds to image number 1, the second reduced-size area a1 b2 corresponds to image number 2, and so on, until the sixth reduced-size area a3 b2 corresponds to image number 6. The second and third printed pages follow the same logic.
[0122] After determining the image number corresponding to each shrink-out area, the output order of the multi-page images can be obtained based on the order of the shrink-out areas and the image numbers corresponding to the shrink-out areas. Specifically: when there are multiple pages, the output order of the multi-page images is obtained by following the order of page 1 to page n, and within each page, by following the order of shrink-out area 1 to shrink-out area m.
[0123] In some embodiments, when a user selects a multi-page layout mode, each printed page needs to be cropped according to the shrinkage area. When the number of images is large, the above sorting method will make it difficult to re-sort after cropping, which is time-consuming and labor-intensive. Based on this, this embodiment of the invention provides another image arrangement method in the multi-page layout mode, so that the image numbers of the shrinkage areas at the same position between printed pages conform to a certain sorting rule. This eliminates the need for the user to manually sort each cropped shrinkage area. Specifically, for single-sided printing scenarios, the image numbers corresponding to the shrinkage areas at the same position in adjacent printed pages can be arranged continuously. The mapping relationship between the area order n of each shrinkage area in the xth printed page and the image number f(n) is shown in formula (5):
[0124] f(n)=f×n-f+x------(5)
[0125] Where f is the number of pages to print (i.e., the number of prints required to print all the images), n is the region order of the reduced area in the x-th page, x≤f. f(n) refers to the image number corresponding to the n-th region 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 region position (i.e., region order) of the i-th row and j-th column of the x-th page, i≤m,j≤t, m is the row number information in the layout settings of the multi-page layout mode, and t is the column number information in the layout settings of the multi-page layout mode. When the printing order of each image in each printed page is horizontal (i.e., printing line by line from left to right or right to left) in the multi-page layout mode, the region order of each reduced area is calculated using formula (6). When the printing order is vertical (i.e., printing column by column from top to bottom or bottom to top), the region order of each reduced area is calculated using formula (7). Wherein, the printing order will affect the sorting rules of the region order in the multi-page layout 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 layout mode. If the user sets the printing order of each image in each page to be printed from left to right, then the sorting of the region order is also from left to right. If the user sets the printing order of each image on each page to top to bottom, then the area order will also be from top to bottom. Therefore, the printing order will not affect the image number of the image corresponding to the reduced area in formula (5).
[0129] For a multi-page layout in a single-sided printing scenario, taking 17 images as an example, with each page printed at a reduction of 2×3 images, the result of dividing the page into 6 reduction areas is as follows: Figure 2 As shown in the figure. According to formula (1), a total of 3 print pages are required. Therefore, for the first print page, x is 1. If the user sets the printing order to left to right, then the position of the 6th shrinkage area of the first print page is . Figure 2 The location of the reduced area a3b2 shown is i=3, j=2. (Substituting i=3, j=2 into formula (6), we get the area sequence of the reduced area as 6. The corresponding portrait number is obtained according to formula (5): f(6)=3×6-3+1=16.
[0130] When x = 2, the fourth reduced area of the second printed page is... Figure 2 The image number corresponding to the location of the reduced-size printing area a2b2 is: f(4)2=3×4-3+2=11. Therefore, the region sequence of each reduced-size printing area can be mapped to the image number, thus obtaining the image number corresponding to each reduced-size printing area in each printed page.
[0131] Figures 3a to 3c This is a schematic diagram of a printed page provided in an embodiment of the present invention. Figures 3a to 3c As shown, in the three printed pages obtained using the above method, the image numbers corresponding to the same reduced-size area on different printed pages are consecutive. Among them, Figure 3a This is the first page to be printed. Figure 3b This is the second printed page. Figure 3c This is the third printed page. The sixth reduced area (a3b2) of the third printed page is a blank image. Therefore, users can stack the three printed pages in order and then trim them simultaneously, resulting in six stacks. The images in each stack are numbered consecutively from top to bottom. For example, the images in the top left stack are numbered 1, 2, and 3 from top to bottom. The images in the top right stack are numbered 4, 5, and 6. The six stacks are then stacked in top-to-bottom order. That is, by stacking the six stacks according to the order of the reduced areas—top left, top right, center left, center right, bottom left, and bottom right—users obtain 17 consecutively numbered images, eliminating the need for manual sorting after trimming and improving the user experience.
[0132] For multi-page double-sided printing scenarios, the image arrangement on the second side of each printed page needs to be adjusted accordingly to ensure that the image numbers on both sides of the printed page correspond. This ensures that the first image number corresponding to the first reduced area on the first side of the printed page and the second image number corresponding to the second reduced area on the second side of the printed page are arranged consecutively. Specifically, the position of the first reduced area on the first side and the position of the second reduced area on the second side are mirror images of each other. Figure 2 Taking the diagram of the reduced printing area shown as an example, the first and second sides of the printed page are each divided into 6 reduced printing areas. The division results for the first and second sides are as follows: Figure 2 As shown. The first reduced area on the first side of the printed page is... Figure 2 The location of the reduced-size printing areas a1 and b1 shown in the figure. Figure 2 The mirror image of the reduced area a1 b1 on the first page is the reduced area a1 b2. The location of reduced area a1 b2 is the location of the second reduced area on the second page of the printed page. That is, the mirror image of the leftmost reduced area in the i-th row on the first page of the printed page is the rightmost reduced area in the i-th row on the second page of the printed page. Therefore, when the image number corresponding to the reduced area a1 b1 on the front of the first printed page is 1, the image number corresponding to the reduced area a1 b2 on the back of the first printed page is 2. Correspondingly, when this reduced area is cut off, the image printed on the front is the image with image number 1, and the image printed on the back is the image with image number 2. Therefore, the image number corresponding to the reduced area a1 b1 on the front of the second printed page should be 3, and the image number corresponding to the reduced area a1 b2 on the back of the second printed page should be 4. Therefore, by stacking the first printed page on top of the second printed page and cutting it, the stacked images can be numbered consecutively (that is, after cutting the reduced areas of the two printed pages together, two stacked reduced-size sheets are obtained, with the top sheet printed with image number 1 on the front and image number 2 on the back, and the bottom sheet printed with image number 3 on the front and image number 4 on the back).
[0133] For cases where the number of printed surfaces is even, and all printed pages are filled with images without the need for blank pages, the above printing effect can be achieved as follows: First, calculate the image number corresponding to each reduced-size area using formulas (1) to (7). Then, on the printed surface on the back of the printed page, swap the image number in the nth column of the forward sequence with the image number in the nth column of the reverse sequence. Figure 3a Taking the first page of the first printed page as an example, if we directly use... Figure 3bThe layout shown is the second side of the first printed page. Therefore, the back of image number 1 is image number 5, and the back of image number 4 is image number 2. It is clear that the image numbers on the front and back do not correspond. Therefore, [the layout is as follows]. Figure 3b The image numbers of each reduced-size area in the first column are swapped with the image numbers of each reduced-size area in the second column to obtain... Figure 4 A schematic diagram of the second side of the first printed page shown. Figure 4 The second side shown is the first printed page. Figure 3a As the first side of the first printed page, the back of portrait number 1 is portrait number 2, and the back of portrait number 4 is portrait number 5. At this time, the portrait numbers on the front and back sides correspond consecutively.
[0134] Optionally, in some embodiments, a trimming indicator line can be added at the boundary of the trimming area in the multi-page layout mode to facilitate trimming by the user. Figure 5 This is a schematic diagram of a printed page provided as an embodiment of the present invention. For example... Figure 5 As shown, the cutting indicator line is Figure 5 The dotted lines in the text allow users to cut according to the cutting instructions, further enhancing the user experience.
[0135] Step 104: Print out each page of images according to the output order.
[0136] In the normal output mode, the image forming apparatus prints multiple images in output order, with one image corresponding to one side of each printed page. For scenarios involving multiple pages combined or booklet output, one side of each printed page corresponds to multiple images, resulting in different images printed in different positions on the final printed paper.
[0137] Corresponding to the above-described image sorting method, this embodiment of the invention provides an image forming apparatus. Figure 6 This is a schematic diagram of an image forming apparatus provided in an embodiment of the present invention. Figure 6 As shown, 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 from several image sources, the image attributes of each page of images, and the output mode of the multiple pages of images.
[0139] The numbering module 602 is used to determine the image number of each image on each page based on several image sources and image attributes.
[0140] The processing module 603 is used to determine the output order of each page of images based on the image number and the output mode.
[0141] Execution module 604 is used to print each page of the image according to the output order.
[0142] Figure 6 The image forming apparatus provided in the illustrated embodiment can be used to execute this specification. Figures 1-5 The implementation principle and technical effects of the method embodiment shown can be further referred to the relevant description in the method embodiment.
[0143] Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention, such as... Figure 7 As shown, the aforementioned electronic device may include at least one processor and at least one memory communicatively connected to the processor, wherein the memory stores program instructions executable by the processor, and the processor can execute this specification by calling the program instructions. Figure 1-2 The illustrated embodiment provides a method for sorting images.
[0144] like Figure 7 As shown, the electronic device is represented in the form of a general-purpose 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 bus architectures, including a memory bus or memory controller, a peripheral bus, a graphics acceleration port, a processor, or a local bus using any of the various bus architectures. 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 Interconnect (PCI) bus.
[0146] Electronic devices typically include a variety of computer-readable media. These media can be any available media that can be accessed by the electronic device, including volatile and non-volatile media, and removable and non-removable media.
[0147] Memory 730 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) and / or cache memory. The electronic device may further include other removable / non-removable, volatile / non-volatile computer system storage media. 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 the embodiments described herein.
[0148] A program / utility having a set (at least one) of program modules can be stored in memory 730. Such program modules include—but are not limited to—an operating system, one or more application programs, other program modules, and program data. Each or some combination of these examples may include an implementation of a network environment. The program modules typically perform the functions and / or methods described in the embodiments of this specification.
[0149] Processor 710 executes various functional applications and data processing by running programs stored in memory 730, such as implementing the functions described in this specification. Figure 1-4 The illustrated embodiment provides a method for sorting images.
[0150] This specification provides a computer program product, which includes a computer program that, when executed by a processor, performs the functions described in this specification. Figure 1-4 The illustrated embodiment provides a method for sorting images.
[0151] This specification provides a computer-readable storage medium storing computer instructions that cause a computer to execute this specification. Figure 1-4 The illustrated embodiment provides a method for sorting images.
[0152] The aforementioned computer-readable storage medium may be any combination of one or more computer-readable media. A computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium. A computer-readable storage medium may be, for example—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples (a non-exhaustive list) of computer-readable storage media include: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), or flash memory, optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this document, a computer-readable storage medium may be any tangible medium that contains or stores a program that may be used by or in connection with an instruction execution system, apparatus, or device.
[0153] The foregoing has described specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired result. In some embodiments, multitasking and parallel processing are possible or may be advantageous.
[0154] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this specification. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.
[0155] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this specification, "a plurality of" means at least two, such as two, three, etc., unless otherwise explicitly specified.
[0156] Any process or method described in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or more executable instructions for implementing custom logic functions or processes, and the scope of the preferred embodiments of this specification includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the functions involved, as will be understood by those skilled in the art to which the embodiments of this specification pertain.
[0157] Depending on the context, the word "if" as used here can be interpreted as "when," "when," "in response to determination," or "in response to detection." Similarly, depending on the context, the phrase "if determination" or "if detection (of the stated condition or event)" can be interpreted as "when determination," "in response to determination," "when detection (of the stated condition or event)," or "in response to detection (of the stated condition or event)."
[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, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0160] Furthermore, the functional units in the various embodiments of this specification can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or in a combination of hardware and software functional units.
[0161] The integrated units implemented as software functional units described above can be stored in a computer-readable storage medium. These software functional units, stored in a storage medium, include several instructions to cause a computer device (which may be a personal computer, a connector, or a network device, etc.) or a processor to execute some steps of the methods described in the various embodiments of this specification. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0162] The above description is merely 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 within the scope of protection of this specification.
[0163] The same or similar parts between the various embodiments in this specification can be referred to mutually. In particular, the device embodiments and terminal embodiments are basically similar to the method embodiments, so the description is relatively simple, and the relevant parts can be referred to the description in the method embodiments.
Claims
1. A method for sorting images, characterized in that, Applied to an image forming apparatus, including: Obtain multiple pages of images from several image sources, the image attributes of each page, and the output mode of the multiple pages of images; Based on the aforementioned image sources and image attributes, determine the image number for each page of images; The output order of each page of images is determined based on the image number and the output mode. Print each page of images according to the output order; The output modes include at least a print mode and a layout mode. Determining the output order of each page of images based on the image number and the output mode includes: The output order of each page of images is determined based on the printing mode, the layout mode, and the image number of each image. The step of determining the image number for each page of images based on several of the image sources and the image attributes includes: Obtain the total number of pages in the multi-page image; The image identification information for each page of images is determined based on the image attributes. The images on each page are sorted according to the aforementioned sources of images, the image identification information of each image, and the total number of pages; Based on the sorting results, each page of images is numbered to obtain the image number for each page.
2. The method according to claim 1, characterized in that, The image attributes include one or more combinations of the following: outer cover, inner cover, main text, inner back cover, and outer back cover.
3. The method according to claim 1, characterized in that, The image source is a single image source. The process of determining the image number for each page based on several image sources and the image attributes includes: Obtain the total number of pages in the multi-page image; Based on the image attributes of each page of the image source and the total number of pages of the multi-page image, determine the image number of each page of the image source.
4. The method according to claim 1, characterized in that, The image sources are at least two, and the process of determining the image number for each page based on the image sources and the image attributes includes: Determine the first arrangement order of each image source and the number of subpages of the image corresponding to each image source; wherein, the sum of the number of subpages of the image corresponding to each image source is taken as the total number of pages of the multi-page image. For any image source, a second arrangement order of the images corresponding to the image source is determined based on the image attributes of each image in the image source and the number of subpages of all images in the image source. The image number for each page is determined based on the first arrangement order of the images from each image source, the second arrangement order of all images from each image source, and the total number of pages.
5. The method according to claim 1, characterized in that, The layout mode is a multi-page layout mode. Determining the output order of each page of images based on the printing mode, the layout mode, and the image number of each image includes: Determine the number of pages to be printed; the number of pages to be printed represents the amount of paper required to print all the images. Each printed page is divided into M reduction areas; where M is a positive integer greater than or equal to 2. Determine the image number corresponding to each of the aforementioned reduced-size areas; The output order of each page of images is obtained based on the image number corresponding to each of the reduced-size areas, the printing mode, and the layout mode.
6. The method according to claim 5, characterized in that, Determining the number of pages to be printed includes: Obtain the total number of pages in the multi-page image and the layout settings information for each printed page in the multi-page combined layout mode; The number of pages to be printed is determined based on the total number of pages and the layout information.
7. The method according to claim 6, characterized in that, The layout information includes row number information and column number information. Dividing the print surface of each page into M reduction areas includes: Based on the row number information and the column number information, the printing surface of each printed page is divided into M reduction areas.
8. The method according to claim 5, characterized in that, The step of determining the image number corresponding to each of the reduced-size areas includes: Determine the location of each reduced area on the printed surface of the page; The order of each reduced-size area in the printed surface of the printed page is determined based on M and the area position. The image number corresponding to each reduced area in each printed page is determined based on the number of printed pages and the order of the areas.
9. The method according to claim 8, characterized in that, The step of determining the image number corresponding to each reduced area in each printed page based on the number of printed pages and the area order includes: Based on the predetermined mapping relationship between the regional order of each reduced-size area in each printed page and the image number, as well as the number of printed pages, the image number corresponding to each reduced-size area is determined.
10. The method according to claim 5, characterized in that, The printing mode is a single-sided printing mode, and the image numbers corresponding to the same reduced-size area are arranged consecutively in different printed pages.
11. The method according to claim 5, characterized in that, The printing mode is a double-sided printing mode. In each printed page, the first image number corresponding to the first shrinkage area on the first side of the printed page and the second image number corresponding to the second shrinkage area on the second side of the printed page are arranged consecutively. The area position of the first shrinkage area on the first side and the area position of the second shrinkage area on the second side are mirror-symmetrical.
12. The method according to claim 1, characterized in that, The output mode includes at least a layout mode. When the layout mode is a normal output mode, determining the output order of each page of images based on the image number and the output mode includes: Obtain the output rules for the normal output mode; the output rules include forward output and reverse output. If the output rule of the normal output mode is ascending order, then the output order of the multi-page portraits is in ascending order of portrait number; If the output rule of the normal output mode is reverse output, then the output order of the multi-page portraits is in descending order of the portrait number.
13. The method according to claim 1, characterized in that, The output mode includes at least a layout mode, wherein the layout mode is a booklet mode, and the total number of pages of the multi-page portrait satisfies a first constraint condition. Determining the output order of each page of the portrait based on the portrait number and the output mode includes: The multi-page images are arranged in ascending and descending order according to their image numbers to obtain corresponding ascending and descending image groups. The first image corresponding to page n in the forward-order image group and the second image corresponding to page n in the reverse-order image group are grouped together to obtain multiple image sets; wherein, n ≤ total number of pages / 2; Multiple sets of images are arranged according to a preset sorting rule; The output order of the multiple sets of images is determined based on the output mode and the result of the arrangement.
14. The method according to claim 1, characterized in that, The output mode includes at least a layout mode, wherein the layout mode is a booklet mode, and the total number of pages of the multi-page portrait does not meet the first constraint condition. Determining the output order of each page of the portrait based on the portrait number and the output mode includes: The multi-page images are arranged in ascending and descending order according to their image numbers to obtain corresponding ascending and descending image groups. A blank image is inserted after the last image in the forward-order image group and before the first image in the reverse-order image group, so that the total number of pages in the forward-order image group and the total number of pages in the reverse-order image group both satisfy the first constraint condition; The third image on page n of the forward-order image group after inserting the blank image and the fourth image on page n of the reverse-order image group after inserting the blank image are grouped together to obtain multiple image sets; Multiple sets of images are arranged according to a preset sorting rule; The output order of the multiple sets of images is determined based on the output mode and the result of the arrangement.
15. An image forming apparatus, characterized in that, include: The acquisition module is used to acquire multiple pages of portraits input from several portrait sources, the portrait attributes of each page of portraits, and the output mode of the multiple pages of portraits; The numbering module is used to determine the image number of each page of images based on the aforementioned image sources and image attributes; The processing module is used to determine the output order of each page of images based on the image number and the output mode; The execution module is used to print each page of images according to the output order; The output modes include at least a print mode and a layout mode, and the processing module is specifically used for: The output order of each page of images is determined based on the printing mode, the layout mode, and the image number of each image. The numbering module is specifically used for: Obtain the total number of pages in the multi-page image; The image identification information for each page of images is determined based on the image attributes. The images on each page are sorted according to the aforementioned sources of images, the image identification information of each image, and the total number of pages; Based on the sorting results, each page of images is numbered to obtain the image number for each page.
16. An electronic device comprising: At least one processor; as well as At least one memory communicatively connected to the processor, wherein: The memory stores program instructions that can be executed by the processor, and the processor can invoke the program instructions to perform the method as described in any one of claims 1 to 14.
17. A computer-readable storage medium storing computer instructions that cause the computer to perform the method as claimed in any one of claims 1 to 14.
18. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, implements the method of any one of claims 1-14.
Citation Information
Patent Citations
Image forming device
JP2005153326A