1. Field of the Invention
The present invention relates to an image recording apparatus that prints a print medium on which image data is laid out, a method of generating print data for the same, and a control program for implementing the method of generating print data.
2. Description of the Related Art
Conventionally, when printing image data, a layouter is used for laying out the image data on print media such as sheets. To prevent sheets from being wasted, the layouter automatically aligns a lengthwise orientation of each piece of the image data with a longitudinal direction of a rectangular region designated in advance on the print medium concerned. When it is necessary to rotate images for the orientation alignment, if a method is used that rotates the images by 90° in the same direction every time, the images will be laid out with no consideration whatsoever as to the “top-bottom orientations” of respective images, and therefore the following problems occur.
(1) When a plurality of image data are laid out on a single print medium, the top-bottom orientations of the resulting images may not be uniform from one another.
(2) When using a layout where in addition to image data, objects whose top-bottom orientations should be properly aligned are inserted, the top-bottom orientations of the objects may not match the top-bottom orientations of the image data.
Japanese Laid-Open Patent Publication (Kokai) No. H06-342463 discloses a solution to the above problem (1). When index printing is carried out for a plurality of originals read by a scanner, the size, orientation, and the like of the respective original image data input from the scanner are detected, and based on the thus detected information, the lengthwise orientations of the respective originals are determined. Then, further information is obtained that is indicative of whether each piece of original image data is vertically long (i.e., portrait) or horizontally long (i.e., landscape), the images are laid out, and the index printing is carried out.
As another solution to the problem (1), Japanese Patent Publication No. 3082982 discloses that images are printed in accordance with the orientations of images caused by a user to be displayed on a display or the like.
However, the techniques disclosed in Japanese Laid-Open Patent Publication (Kokai) No. H06-342463 and Japanese Patent Publication No. 3082982 have the following problems.
In the technique disclosed in Japanese Laid-Open Patent Publication (Kokai) No. H06-342463, the original data is read optically, and based on vertical and horizontal dimensions of the obtained image data, it is determined whether to output image data in portrait orientation or landscape orientation. However, this technique cannot be applied to a system such as a modern digital camera where images picked up with the camera held in a vertical posture are recorded as landscape images.
In the technique disclosed in Japanese Patent Publication No. 3082982, although it is certainly possible to solve the problem (1), to realize such technique, a display device for displaying the image data, a memory for storing the image data to be displayed, and the like are required, resulting in the unavoidable increased cost of providing such equipment. Also, when there is a large amount of image data to be printed, it will be necessary to display all of the image data and to have the user set the display orientation separately for the respective images, which makes the operation extremely complex.
It is a first object of the present invention to provide an image recording apparatus and a print data generating method for the same, that are capable of realizing a favorable print layout where bottom orientations of image data are made uniform easily and at low cost, and a control program for implementing the method.
It is a second object of the present invention to provide an image recording apparatus and a print data generating method for the same, that are capable of making bottom orientations uniform in an entire layout including not only image data but also objects, and a control program for implementing the method.
To attain the above first and second objects, in a first aspect of the present invention, there is provided an image recording apparatus comprising a rotation information obtaining device that obtains rotation information of image data, a layout switching device that selects a print layout in accordance with the rotation information, and a print data generating device that generates, in accordance with the print layout selected by the layout switching device, print data for printing a print medium on which the image data is laid out.
According to the above construction, it is possible to realize a favorable print layout where orientations (for example, bottom orientations) of image data are made uniform easily and at low cost. In addition, it is possible to make uniform the bottom orientations of an entire layout including not only image data but also objects.
Preferably, the layout switching device includes at least four layout patterns for each of at least one layout type, and selects a predetermined layout pattern according to the rotation information, out of the four layout patterns.
Alternatively, the layout switching device includes two layout patterns for each of the at least one layout type, and selects one of the two layout patterns according to a result of a determination to determine whether the image data is for a landscape image or a portrait image based on a viewing bottom orientation included in the rotation information.
To attain the above first and second objects, in a second aspect of the present invention, there is provided an image recording apparatus comprising a rotation information obtaining device that obtains respective rotation information of a plurality of image data, a sorting device that sorts a print order of the plurality of image data in accordance with the respective rotation information, and a print data generating device that generates, in accordance with the print order sorted by the sorting device, print data for printing a print medium on which at least one image data out of the plurality of print data is laid out.
According to the above construction, it is possible to realize a favorable print layout where orientations (for example, bottom orientations) of image data are made uniform easily and at low cost. In addition, it is possible to make uniform the bottom orientations of an entire layout including not only image data but also objects.
Preferably, the sorting device comprises an image size obtaining device that obtains image sizes of the plurality of image data, and an image data lengthwise orientation determining device that determines whether the plurality of image data having been rotated so that bottom orientations thereof are set at a bottom edge of the print medium are each in portrait orientation or landscape orientation, based on the image sizes obtained by the image size obtaining device and the rotation information, and the sorting device sorts the print order of the plurality of image data based on a determination result obtained by the image data lengthwise orientation determining device.
More preferably, the image recording apparatus comprises a layouter that lays out the plurality of image data on at least one print medium, and the layouter lays out the plurality of image data on the at least one print medium such that image data determined to be in portrait orientation by the image data lengthwise orientation determining device and image data determined to be in landscape orientation are not laid out on a same print medium.
Even more preferably, the layouter includes a bottom orientation uniforming device that rotates the plurality of image data in accordance with the rotation information so that bottom orientations of image data laid out on a same print medium are made equal to one another.
Even more preferably, the image recording apparatus comprises a memory with a limitation of being incapable of storing an entire decoding result obtained when the plurality of image dada are decoded, and the bottom orientation uniforming device comprises a combination detecting device that detects a combination of the respective rotation information of the plurality of image data that minimizes a processing load of a process to be carried out by the bottom orientation uniforming device to obtain the image data having been rotated, and an image rotating section that rotates the plurality of image data in accordance with the combination detected by the combination detecting device.
More preferably, the layouter includes two layout patterns for each of at least one layout type, and uses one of the two layout patterns according to whether the image data to be laid out on a same page corresponding to the print medium is in landscape orientation or portrait orientation.
To attain the above first and second objects, in a third aspect of the present invention, there is provided an image recording apparatus comprising a rotation information obtaining device that obtains respective rotation information of a plurality of image data, a rotation angle determining device that determines rotation angles for the plurality of image data when the plurality of image data are laid out, in accordance with the rotation information, and a print data generating device that generates, in accordance with the rotation angles determined by the rotation angle deciding device, print data for printing a print medium on which the image data are laid out.
According to the above construction, it is possible to realize a favorable print layout where orientations (for example, bottom orientations) of image data are made uniform easily and at low cost. In addition, it is possible to make uniform the bottom orientations of an entire layout including not only image data but also objects.
Preferably, the rotation angle determining device includes a focus orientation determining device that determines which out of top, bottom, left, and right edges of the print medium is a focus orientation edge, and determines the rotation angles of the image data based on the rotation information so that the focus orientation edge determined by the focus orientation determining device matches with bottom orientations of the image data.
More preferably, the focus orientation edge is uniquely determined for a layout pattern for laying out the image data on the print medium.
More preferably, the focus orientation edge is determined such that those images are increased in number which correspond to the image data and whose lengthwise orientations determined with reference to viewing bottom orientations of the images determined from the rotation information match with lengthwise orientations of image layout frames determined according to a layout pattern for laying out the image data on the print medium.
To attain the above first and second objects, in a fourth aspect of the present invention, there is provided an image recording apparatus comprising a rotation information obtaining device that obtains rotation information of image data, a layout device that sets a layout for laying out the image data, with the layout reflecting the rotation information, and a print data generating device that generates, in accordance with the layout set by the layout device, print data for printing a print medium on which the image data is laid out.
According to the above construction, it is possible to realize a favorable print layout where orientations (for example, bottom orientations) of image data are made uniform easily and at low cost. In addition, it is possible to make uniform the bottom orientations of an entire layout including not only image data but also objects.
To attain the above first and second objects, in a fifth aspect of the present invention, there is provided a print data generating method for an image recording apparatus, comprising a rotation information obtaining step of obtaining rotation information of image data, a layout switching step of selecting a print layout in accordance with the rotation information, and a print data generating step of generating, in accordance with the print layout selected in the layout switching step, print data for printing a print medium on which the image data is laid out.
To attain the above first and second objects, in a sixth aspect of the present invention, there is provided a print data generating method for an image recording apparatus, comprising a rotation information obtaining step of obtaining respective rotation information of a plurality of image data, a sorting step of sorting a print order of the plurality of image data in accordance with the respective rotation information, and a print data generating step of generating, in accordance with the print order sorted in the sorting step, print data for printing a print medium on which at least one image data out of the plurality of print data is laid out.
To attain the above first and second objects, in a seventh aspect of the present invention, there is provided a print data generating method for an image recording apparatus, comprising a rotation information obtaining step of obtaining respective rotation information of a plurality of image data, a rotation angle determining step of determining rotation angles for the plurality of image data when the plurality of image data are laid out, in accordance with the rotation information, and a print data generating step of generating, in accordance with the rotation angles determined in the rotation angle determining step, print data for printing a print medium on which the image data are laid out.
To attain the above first and second objects, in an eighth aspect of the present invention, there is provided a print data generating method for an image recording apparatus, comprising a rotation information obtaining step of obtaining rotation information of image data, a layout step of setting a layout for laying out the image data, with the layout reflecting the rotation information, and a print data generating step of generating, in accordance with the layout set in the layout step, print data for printing a print medium on which the image data is laid out.
To attain the above first and second objects, in a ninth aspect of the present invention, there is provided a computer-readable control program for causing a computer to implement a print data generating method for an image recording apparatus, the control program comprising a rotation information obtaining module for obtaining rotation information of image data, a layout switching module for selecting a print layout in accordance with the rotation information, and a print data generating module for generating, in accordance with the print layout selected by the layout switching module, print data for printing a print medium on which the image data is laid out.
To attain the above first and second objects, in a tenth aspect of the present invention, there is provided a computer-readable control program for causing a computer to implement a print data generating method for an image recording apparatus, the control program comprising a rotation information obtaining module for obtaining respective rotation information of a plurality of image data, a sorting module for sorting a print order of the plurality of image data in accordance with the respective rotation information, and a print data generating module for generating, in accordance with the print order sorted by the sorting module, print data for printing a print medium on which at least one image data out of the plurality of print data is laid out.
To attain the above first and second objects, in an eleventh aspect of the present invention, there is provided a computer-readable control program for causing a computer to implement a print data generating method for an image recording apparatus, the control program comprising a rotation information obtaining module for obtaining respective rotation information of a plurality of image data, a rotation angle determining module for determining rotation angles for the plurality of image data when the plurality of image data are laid out, in accordance with the rotation information, and a print data generating module for generating, in accordance with the rotation angles determined by the rotation angle determining module, print data for printing a print medium on which the image data are laid out.
To attain the above first and second objects, in a twelfth aspect of the present invention, there is provided a computer-readable control program for causing a computer to implement a print data generating method for an image recording apparatus, the control program comprising a rotation information obtaining module for obtaining rotation information of image data, a layout module for setting a layout for laying out the image data, with the layout reflecting the rotation information, and a print data generating module for generating, in accordance with the layout set by the layout module, print data for printing a print medium on which the image data is laid out.
The above and other objects, features, and advantages of the invention will become more apparent from the following detailed description taken in conjunction with the accompanying drawings.
The present invention will now be described in detail below with reference to the drawings showing a preferred embodiment thereof. An image recording apparatus according to the present embodiment is applied to a directly connectable photo printer, for example.
First, the overall construction, hardware construction, and software construction of an image recording system used in the present embodiment will be described.
The image recording system shown in
When directly printing image data from a memory card using the image recording apparatus 12, the memory card is inserted into a card adapter provided in the image recording apparatus 12 so that the image data may be accessed from the image recording apparatus 12.
Next, the hardware construction of the image recording apparatus 12 appearing in
As shown in
Reference numeral 102 in
A connector 106 is used to connect the memory card 107. Via the connector 106, the image recording apparatus 12 can directly read and print image data from the memory card 107. Reference numeral 108 denotes a USB bus connector having a port for connecting a digital camera 110 that corresponds to the host apparatus 11 appearing in
The digital camera 110 is constructed so as to be capable of storing image data and print setting information in an internal memory thereof and outputting them to the image recording apparatus 12. Note that a variety of constructions can be used for the digital camera 110, such as a construction including an internal non-removable memory or a construction including a slot for attaching a removable memory. Image data in the digital camera 110 can be processed in the image recording apparatus 12 in accordance with the print setting information set to the digital camera 110, and therefore, the image recording apparatus 12 can print images when directly connected to the digital camera 110 (a so-called “camera direct print” operation).
Reference numeral 111 denotes a USB hub that passes on image data when printing is carried out based on image data supplied from a personal computer (PC) 113 connected thereto via a connector 112. A connector 115 connects a carriage-return control panel (CR control panel) and a print head 116. The control board 100 also includes a connector 118 through which an LF motor driver 117 is connected to an LF motor 119, a connector 121 through which an ASF motor driver 120 is connected to an ASF motor 122, and a power supply connector 123 that inputs a DC voltage converted from commercial AC by a power supply 124.
Next, the software construction of the image recording apparatus 12 will be described.
A module construction of the image recording apparatus 12 will be described with reference to
First, explanations on direct printing using the memory card will be given.
When the memory card 107 is connected to the connector 106 of the image recording apparatus 12, the user can designate images and can give an instruction for a start of printing using the operation panel 103 and the viewer 105. By doing so, it is possible to browse and/or print images in the memory card 107.
When the user prints image data in the memory card 107, in timing in which a print start key on the operation panel 103 is pressed, first a print start request is sent from an operation panel I/F section 206 to a photo direct function (hereinafter “PD function”) control section 201. Note that the operation panel I/F section 206 and a viewer I/F section 208 cooperate to share key operation information for the operation panel 103 and connection state information for the digital camera 110 and the memory card 107, and cause the viewer 105 to display suitable menu images and image data thereon.
In response to the print start request, the PD function control section 201 informs a main control section 200 of receiving the request, and then the main control section 200 gives instructions to a digital camera USB I/F section 202 and a PC USB I/F section (not shown) to prevent them from receiving any data sent from the digital camera 110 and the PC 113. After such instructions are communicated to the digital camera 110 and the PC 113, and thereby the image recording apparatus 12 has entered a state where the image recording apparatus 12 can print from the memory card 107 exclusively, the main control section 200 gives the PD function control section 201 permission to switch to a photo direct print process.
After receiving the permission, the PD function control section 201 gives a print instruction to a rasterizer manager 210. The rasterizer manager 210 selects a rasterizer suitable for a present print mode and causes the selected rasterizer to carry out processing. For example, when printing from the PC 113, print data that is sent to the image recording apparatus 12 (the directly connectable photo printer), but when printing directly from the digital camera 110 or the memory card 107, not print data but image file data that has not been decoded nor otherwise processed is sent to the image recording apparatus 12. For this reason, when printing from the PC 113, the rasterizer manager 210 selects a non-PD print rasterizer 211 and causes the non-PD print rasterizer 211 to process the print data from the PC 113, while when printing from the digital camera 110 or the memory card 107, the rasterizer manager 210 causes a job generating section 212 and a rasterizer 213 to operate and thereby generate the print data.
When receiving a print processing instruction from the rasterizer manager 210, the job generating section 212 first enquires to the PD function control section 201 as to whether direct printing to be carried out at present is from the memory card 107 or from the digital camera 110. When, as a result, the job generating section 212 is notified that the direct printing from the memory card 107 is to be carried out, the job generating section 212 obtains the print setting information set by the user from the operation panel I/F section 206 and generates a job. After this, the job generating section 212 gives a print processing instruction to the rasterizer 213.
The rasterizer 213 generates print data based on job information on the generated job. The job information is composed of information on a size (sheet size) and type (sheet type) of print medium, a printing method such as single image layout printing or index printing, print quality, instructions relating to various types of image correction, information relating to the image file(s) designated for printing, and information indicating from which of the memory card 107 and the digital camera 110 the printing is to be carried out.
The rasterizer 213 first interprets the job information, determines an operation mode of a printer engine section (not shown) based on the type of medium and the print quality, and informs an engine control section 215 of the determined operation mode. Next, layout information indicative of the positions and sizes to be used when laying out image data on a single print medium is generated in accordance with the sheet size and printing method, and print data is then generated using information relating to the image file(s) designated for printing. The print data is generated by the following steps, for example.
(1) Read and decode the image file(s) designated for printing.
(2) Convert a color space of the decoded image data to a color space unique to a corresponding device.
(3) Carry out halftoning in which respective pixels are quantified into quantized amounts indicative of states of the respective pixels.
Note that the quantification is carried out according to a data format which can be processed by the image recording apparatus 12. For example, when the image recording apparatus 12 records images based on binary data, respective pixels are binarized, while when the image recording apparatus 12 records images based on multivalic data (to record images using ink capable of reproducing a plurality of tones according to print density or to record images using ink capable of reproducing a plurality of tones according to dot size), respective pixels are multivalued.
In addition, the rasterizer 213 outputs requests for sheet feeding or sheet discharging, sheet conveying, printing, and the like to the engine control section 215 as necessary, and exchanges messages with the engine control section 215 so that the processing proceeds in synchronization.
In the case of direct printing from the memory card 107, access-to the image file(s) designated for printing is carried out via a memory card I/F section 204. On the other hand, when printing is carried out from the digital camera 110, access is carried out via the USB I/F section 202.
A data converting section 214 converts print data generated by the rasterizer 213 and print data received from the non-PD print rasterizer 211 to a data format that can be received by the printer engine section, and notifies the engine control section 215 of converted data via the main control section 200 whenever a predetermined amount of converted data has accumulated.
The engine control section 215 transfers the converted data to the printer engine section, while taking account the operation mode of the printer engine, and causes the printer engine to carry out a print process.
Next, processing when printing directly from the digital camera 110 will be described.
When the digital camera 110 is connected to the terminal 109 (the USB I/F section 202), the user can use a function provided in the digital camera 110 to designate images, to make print settings, and to give an instruction for start of printing. By doing so, it is possible to browse and/or print images stored in the memory (storage section) of the digital camera 110. When image data is directly printed from the digital camera 110, in timing in which a print start key of the digital camera 110 is pressed, first a print start request is sent from the USB I/F section 202 to the PD function control section 201.
In response to the print start request, the PD function control section 201 informs the main control section 200 of receiving the request, and then the main control section 200 gives instructions to the memory card I/F section 204 and the PC USB I/F section to prevent them from receiving any data sent from the memory card 107 and the PC 113. After such instructions are communicated to the memory card 107 and the PC 113 and thereby the image recording apparatus 12 has entered a state where the image recording apparatus 12 can print from the digital camera 110 exclusively, the main control section 200 gives the PD function control section 201 permission to switch to a photo direct print process.
The operation of the PD function control section 201 in this case is the same as with the case where direct printing from the memory card 107 is carried out.
In response to the print processing instruction from the rasterizer manager 210, the job generating section 212 first enquires to the PD function control section 201 as to whether direct printing to be carried out at present is from the memory card 107 or from the digital camera 110. When, as a result, the job generating section 212 is notified that the direct printing from the digital camera 110 is to be carried out, the job generating section 212 obtains the print setting information set by the user from the USB I/F section 202 and generates a job. After this, the job generating section 212 gives a print processing instruction to the rasterizer 213.
The operation of the rasterizer 213 in this case is substantially the same as when direct printing is carried out from the memory card 107, with the difference being that the desired image file(s) is/are accessed via the USB I/F section 202. The data converting section 214 and the engine control section 215 carry out the same operation as in the direct printing from the memory card 107.
The present invention is most closely related to the rasterizer 213 in the module construction described above, and the process carried out by the rasterizer 213 will now be described with reference to
As shown in
In a step S302, by referring to the information about the sheet type, the print quality, whether printing with margins is to be carried out, and the like that is included in the job information obtained in the step S301, the operation mode of the printer engine section is determined. In a step S303, the engine control section 215 is notified of the operation mode of the printer engine section determined in the step S302, and then the printer engine section to carry out printing is instructed to initialize itself.
Next, in a step S304, by referring to the sheet size, the print method, and the like in the job information, with consideration to resolution information for print data that varies according to the operation mode of the printer engine section determined previously, the layout information about how many images are to be laid out on a single print medium and the positions and sizes of the respective images is generated. Also, in the step S304, internal character string layout information indicative of an insertion position of a character string into a corresponding image used when carrying out date/time printing and external character string layout information indicative of a layout position of a character string on a margin area around a corresponding image used when carrying out index printing are set (generated) in the same way. Settings are also made for various types of objects aside from image data and character strings, such as ruled lines.
After this, an image laying out step (step S305) is carried out at a start of each page. In this step, it is determined which image data out of the image data designated for printing are to be laid out at respective image layout positions set for the page in the step S304. Next, in a step S306, by referring to the job information, it is determined whether the presently requested job is index printing or another type of printing and then a step to be executed next is switched accordingly.
When index printing is determined in the step S306, the process proceeds to an external character string laying out step (step S307). Here, processing is carried out in accordance with the external character string layout information set earlier in the step S304. In the case of index printing, a list of a plurality of image data on the memory card 107 is printed, and as shown in
Index printing is used to generate an image list 403 as shown in
On the other hand, when it is determined in the step S306 that the job to be executed is not index printing, the process proceeds to an internal character string laying out step (step S308). In this step, first, by referring to the job information, it is determined whether the user has designated time/date printing. If time/date printing is not to be carried out, no processing is carried out in the step S308 and the process proceeds to the next step. Conversely, if time/date printing is to be carried out, processing is carried out in accordance with the internal character string layout information set in the step S304.
When time/date printing is carried out without carrying out index printing, as shown in
When layout settings for images and the like have been made, the process proceeds to a step S309. In the step S309, the rasterizer 213 instructs the engine control section 215 to carry out sheet feeding. After this, a print data generating process (step S310) and a sheet discharging process (step S311) are carried out. In the step S312, it is determined whether the job has been completed. When the job has not been completed, the process returns to the step S304, while when the job has been completed, a termination process for the printer engine section is carried out (step S313), and the job generating section 212 is notified of the termination of the print process (step S314).
Next, a first case where one image data is printed on one print medium will be described.
The image recording apparatus 12 starts the print data generating process (step S500), and first in a step S501 reads the image data designated for printing from the digital camera 110 or the memory card 107 and stores the image data in the memory 114.
Although it is preferable that there is enough space in the memory 114 for all of the image data to be written therein in a single operation, when this is not possible, the image data may be decoded in part in a decoding operation carried out in a step S502 and enough data for decoding one part may be written into the memory 114 whenever necessary. For ease of explanation, the case where all of the image data is written into the memory 114 in a single operation will be described here.
Next, in the step S502, the image data written in the step S501 is referred to and decoded. Here, image data in one of a variety of formats, such as JPEG or TIFF, is decoded. When there is space in the memory 114, an entire image is decoded and the resulting decoded image data is stored in the memory 114 before the process proceeds further. Conversely, when there is insufficient space in the memory 114, decoding is carried out for a basic unit of image data for the subsequent processing, for example, one raster unit for the case where the orientation of the image data has been aligned with an actual layout orientation on the print medium. Here, when the image to be decoded has a JPEG format, for convenience the image may be decoded in units of eight or sixteen rasters corresponding to the size of the MCU (minimum coded unit).
In the following, the description will be given for only the realistic case where there is insufficient space in the memory 114 of the image recording apparatus 12 of the present embodiment, that is, where the image data generating process is carried out after the image data has been decoded in units of a single raster or eight/sixteen rasters.
In a step S503, a color space of the decoded image data obtained in the step S502 is converted to a color space that is unique to a corresponding device. This conversion may be carried out by direct calculation using a formula or by using an LUT (look-up table).
Next, in a step S504, the image data of which the color space has been converted in the step S503 is subjected to a scaling process in accordance with a size designated as the layout information, that is, the size of a rectangle into which the image data is to be actually laid out on the print medium. Here, a variety of algorithms may be used for the scaling process, such as a nearest neighbor, bilinear, or bicubic algorithm. The layout information is then referred to and the data that has been subjected to the scaling process is outputted to a position corresponding to the image layout position in a line buffer whose capacity corresponds to the width of the print region.
After this, in a step S505, it is determined whether time/date printing is on or off, and when time/date printing is on, steps S506 and S507 are carried out. When time/date printing is off, such steps are not carried out.
In the step S506, the character strings to be decoded and output sizes thereof are determined in accordance with the character string information set in the step S308 in
Next, in a step S509, it is determined whether or not a predetermined amount of print data required when the printer engine section carries out printing, that is, a basic processing unit amount of print data, has accumulated. When such data amount has been accumulated, the process proceeds to a step S510. While when such data amount has not been accumulated, the step S510 is skipped and the process instead proceeds to a step S511. The basic processing unit varies depending on the printer engine section, and can be set to correspond to sixteen rasters, for example. In the step S510, the printer engine section is notified about an accumulated amount of print data, and in response to the notification, the printer engine section starts processing the print data accumulated by the rasterizer.
In the step S511, based on a number of rasters in the page that have been processed and the layout information set in the step S304 in
In the step S512, remaining print data handling process is carried out for the case where the step S511 notifies that there is remaining print data that is less in amount than the basic processing unit and has not been subjected to print processing by the printer engine section. For example, when the basic processing unit for the printer engine section is set to correspond to sixteen rasters and only print data corresponding in amount to eight rasters has been accumulated, the deficient part corresponding in amount to eight rasters is filled with null data, that is, data for which no ink is printed. The resultant print data whose amount corresponds to the basic processing unit is then notified to the printer engine section. After this, the print data generating process is terminated (step S513).
In the first case described above, an example of the print data generating process (the step S310 in
The print data generating method when a plurality of images are laid out according to the present embodiment will now be described with reference to
In the present embodiment, for convenience, when laying out a plurality of images, the row direction and column direction are defined as shown in
In the process shown in
When the generation of one page of print data has been completed, a remaining print data handling process is carried out in a step S531, and the print data generating process is completed in a step S532. Here, the remaining print data handling process in the step S331 has the same role as the step S512 in
Next, the image row loop will be described in detail. In the process shown in
The image data reading step in the step S523 is carried out in the same way as in the step S501 in
In
Referring to
Next, in a step S529, it is determined whether the raster presently being processed is the final raster on the image row presently being processed. When this is the case, the process proceeds to a step S530 to advance the process to the next image row, while when this is not the case, the process returns to the image column loop of the step S522 to process the next raster in the image row being processed.
Next, when the image row loop is completed, a remaining print data handling process is carried out in a step S531, and the print data generating process is terminated in a step S532. In the step S531, in respect of each of images A-H, remaining print data less in amount than the basic processing unit and not having been subjected to print processing is subjected to remaining print data handling process as in the step S512 in
It should be noted that each image row (corresponding two images among images A-H) may be subjected to the remaining print data handling process immediately after the final raster in the image row has been detected in the step S529 in
In the second case described above, an example of the processing in the image data generating process (the step S310) has been explained, where a plurality of image data are laid out and printed on a single print medium. Next, a third case for the print data generating process (the step S310) will be described, where at least one image data is laid out on one print medium and printed with an object such as ruled lines being inserted.
Although a variety of layouts can be used, layouts such as those shown in
A process for laying out image data with the layouts shown in
In
After the image data has been scaled in the step S553, the process proceeds to an object inserting process in a step S554. Here, objects are inserted in accordance with object information designated in the layout information generating step (the step S304) in
In the layouts in
Also, a date/time printing on/off determining process in a step S555, a font decoding process in a step S556, and a font imposing process in a step S557 are respectively the same as the steps S505, S506, and S507 in
This completes the description of the processing of the rasterizer 213.
First to fourth examples according to the embodiment described above will now be described.
The first example relates to the layout information generating step (the step S304) in
In the procedure (A1), an image data file to be laid out on the page concerned is analyzed to thereby obtain an image size (vertical pixel number and horizontal pixel number) and viewing (or image pickup) bottom orientation information as rotation information. In
In the procedure (A2), a layout pattern used to actually lay out an image is determined from lengthwise orientation and viewing image bottom information of the image. This processing is performed by a lengthwise orientation determining section 301 and a layout pattern determining section 302 in
As shown by image data 470, 471, 472, and 473 in
If such image data is laid out using the layout shown in
For this reason, in the first example, four layout patterns 474, 475, 476, and 477 shown in
In the procedure (A3), the width and height and position coordinates of an image data print region used for actually laying out an image to be printed on a print medium are set based on the sheet size obtained by the job information obtaining step (the step S301) in
In the procedure (A4), the width and height and the position coordinates of the ruled lines 467 in
As should be clear from the above explanation and
The first example differs from the prior art in that viewing bottom orientation information of the inputted image is obtained and the viewing bottom orientation information is used to switch the layout pattern itself. This process in the present example can realize an extremely favorable layout for layout types where it is necessary to consider the up-down direction of images, such as that shown in
Also, although the first example has been described as having four layout patterns such as those shown in
Although favorable layout printing can be realized when two layout patterns are provided or when four layout patterns are provided, there are also different advantages to each.
When two layout patterns are used, since there are only two types of layout information for a single layout type, the amount of memory used in storing the layout information is reduced. In addition, since it is not necessary to set respectively symmetrical layout patterns for the first and second categories and for the third and fourth categories, when “borderless” printing is carried out, the layout can be set easily without having to consider whether the images and objects are displaced due to differences in areas for off-the-edge print on the top, bottom, left, and right sides.
On the other hand, when there are at least four layout patterns corresponding to the orientations of image, a favorable layout car be realized without equipping a decoder, which is capable of rotating image files by 0° or 90° and then decoding the image files, with an additional function for rotating image files by 180° and 270°. Also, when the image data is laid out, a rotation process for images will be completely unnecessary if the inputted image data itself is in landscape orientation irrespective of the viewing bottom orientation, and therefore the processing load can be reduced.
It should be noted that regarding the reduction in the image rotating process, it is sufficient to have at least four patterns corresponding to orientations of images, and thus the present invention is not limited to having only four patterns.
In the prior art, when images are rotated and decoded, the desired data is obtained by first decoding all the image data, storing the entire decoded image in a memory, and then controlling the read order for the stored data. This method is extremely difficult to implement in systems having an embedded memory with limited memory capacity and therefore provided with a function that decodes only the actually required of image data at a time. To realize this function for decoding image data in part, it is necessary to frequently carry out file accesses to designate non-consecutive addresses, and to manage the position coordinates of pixels, and therefore the processing load is much larger than simple decoding. In particular, when handling, as inputted image data, a JPEG file which is divided into MCUs and the divided parts do not have a fixed bit length, before carrying out the partial decoding, it is necessary to view the entire file to grasp the boundaries between the divided parts of the image data, thereby obtaining the required position coordinate information.
In this regard, the process using the four layout patterns makes it unnecessary to rotate landscape image data, and is thus extremely effective for systems having a memory and a CPU with limited performance. Also, although it is still necessary to rotate and decode portrait images, since the majority of images that are picked up by a digital camera or the like are landscape images, the process can be said to be effective in most cases. However, in an environment such as a personal computer where there is more than enough memory so that an entire decoded image of one page can be stored, there is no merit to having four layout patterns. Rather, having two layout patterns that achieves the advantage mentioned earlier is superior.
Note that although the processing in the case where the print data is generated in single raster units so that the processing can be applied even to systems with limited memory capacity having been described in the first example, as should be obvious from the above explanation, the layout information generating process in the first example can also be carried out in a case where the print data is generated in units of two or more rasters.
As described above, in the first example, four or two layout patterns conforming to bottom orientations of images are provided for a single layout type, and an appropriate one of the layout patterns is selectively used according to the viewing bottom orientation information of the image and the lengthwise orientation of the image, and therefore it is possible to favorably carry out layout printing for an entire layout including objects such as ruled lines.
The second example of the present embodiment relates to the image laying out step (the step S305) in
In the procedure (B2), every image data file in the list 490 is analyzed to thereby obtain image sizes (numbers of vertical pixels and numbers of horizontal pixels) and viewing bottom orientation information. This process is carried out by an image file analyzing section 300 in
In the procedure (B3), the respective images in the list 490 are classified into two categories. This process is carried out by a lengthwise orientation determining section 301 and a category classifying section 305 in
This classifying process is carried out by the category classifying section 305, with the classifying into two categories being determined based on the combination of the lengthwise orientation of the image data obtained by the lengthwise orientation determining section 301 and the viewing bottom orientation information obtained by the procedure (B2) described above. For example, classifying is carried out according to the following method.
When the lengthwise orientation is the “up-down direction” and the viewing bottom orientation is “left or right”, the image data is classified into the first category, while when the lengthwise orientation is the “up-down direction” and the viewing bottom orientation is “top or bottom”, the image data is classified into the second category. Conversely, when the lengthwise orientation is the “left-right direction” and the viewing bottom orientation is “left or right”, the image data is classified into the second category, while when the lengthwise orientation is the “left-right direction” and the viewing bottom orientation is “top or bottom”, the image data is classified into the first category. Note that information on the lengthwise orientation can be obtained in the same way as in the processing in the first example.
In the procedure (B4), the print order of the plurality of images in the list 490 is sorted. This process is carried out by a print order sorting section 306 appearing in
In the procedure (B5), images to be laid out on each of one or more pages are determined. This process is carried out by an image laying-out section 307 appearing in
In the procedure (B6), these images are laid out on one or more pages (print medium or media). This process is also carried out by the image laying-out section 307. When laying out the whole or part of images on a print medium, it is determined which of the top, bottom, left, and right edges of the print medium is to be set as the bottom edge. Specifically, it is determined that the bottom edges of the images should coincide with the top, bottom, left, or right edge of the print medium (i.e., the print medium should be portrait-oriented or landscape-oriented at the time of printing). Next, the images are rotated and laid out in accordance with viewing bottom orientation information. Specifically, the image rotation/layout is performed such that the viewing bottom orientation information on the images coincides with the bottom edge of the portrait-oriented or landscape-oriented print medium. Here, a rotation angle used when laying out is set as image layout information, for the respective images laid out on the corresponding page without the image data being actually decoded, subjected to color space conversion, and the like. Such image layout information is subsequently referred to during the print data generating process.
Here, which of the top, bottom, left, and right edges of the print medium is to be set as the bottom edge is determined as follows: When the images to be laid out on the corresponding page have been rotated so that their viewing bottom orientations coincide with the bottom edge, if the image data after rotation are in portrait orientation, the top or bottom side of the print medium is selected as the bottom edge. When the image data are in landscape orientation, the left or right side of the print medium is selected. By doing so, even if the image data are rotated so that their viewing bottom orientations match with the bottom edge and with one another, it is possible to reduce the margin space produced on the print medium and print images as large as possible on the print medium.
Out of the procedures (B1) to (B6), the procedures (B1) to (B4) are carried out only at the start of a job and the procedures (B5) and (B6) are carried out at the start of each page.
As should be clear from the above description and
Conventionally, when a plurality of images are designated for printing and are printed with the layout shown in
In addition, when all of the images on the same page are rotated so that the viewing bottom orientations are at the bottom, there is no mixing of portrait images and landscape images, and therefore little margin space is produced on the print medium even when images are rotated so that the viewing bottom orientations match, resulting in it being possible to print images as large as possible on the print medium in the same way as in the prior art.
The third example of the present embodiment relates to the image laying out step (the step S305) in
In the procedure (B6-1), candidates are given as to with which of the top, bottom, left, and right edges of the print medium the viewing bottom orientations of images are to be aligned. This process is carried out by a print medium bottom orientation candidate setting section 308 appearing in
Here, the determination as to which of the top, bottom, left, and right edges of the print medium is to be set as the bottom edge is made as follows: If, when the images to be laid out on the corresponding page have been rotated so that the viewing bottom orientations coincide with the bottom edge, the image data after rotation are in portrait orientation, the top or the bottom of the print medium is set as a first candidate. Conversely if the image data after rotation are in landscape orientation, the left or the right of the print medium is set as a second candidate. By doing so, it is possible to reduce the margin space produced on a print medium even when images are rotated so that the viewing bottom orientations match with the bottom edge and with one another, and therefore it is possible to print images as large as possible on the print medium.
In the procedure (B6-2), estimates for a rotation/laying out processing load are calculated for the cases where the first and second candidates are respectively selected. This process is carried out by a rotation/laying out processing load estimate calculating section 309 appearing in
Finally, the estimated processing loads of all of the images to be laid out on the page for the case where the first candidate is selected are added to calculate the rotation/laying out estimated processing load for the entire page. Similarly, the rotation/laying out estimated processing load for the case where the second candidate is selected is also calculated.
In the procedure (B6-3), the candidate with the smaller rotation/laying out processing load is selected out of the two candidates. This process is carried out by a print medium bottom orientation determining section 310 in
In the procedure (B6-4), rotation angles for laying out are set for the respective images on the page. This process is carried out by a rotation angle determining section 311 appearing in
As should be clear from the above description and
As described above, in the second example, when printing a plurality of pages where a plurality of images are laid out on a single print medium, it is possible to realize favorable layout printing where the viewing bottom orientations of all images on the same page match with one another. There is additionally the effect that small margins are generated on the print medium when the images are rotated to make the viewing bottom orientations match, and therefore the images can be printed as large as possible on the print medium as in the prior art. In the third example, candidates that indicate which of the top, bottom, left, and right edges of the print medium is matched with the viewing bottom orientations of the images are proposed, a combination where the smallest processing load of a process that obtains images after rotation on the page concerned is found from the candidates, and then images are rotated accordingly, so that in addition to the effects of the second example described above, it is possible to reduce the processing during laying out.
Also, the second and third examples can provide a layout where images are favorably laid out regardless of which of the top, bottom, left, and right edges of the print medium is set as the bottom edge so long as the lengthwise orientations and the viewing bottom orientations of the image data A, B, C, and D laid out on the page are all equal as shown in
To do so, first, before the layout information generating step (the step S304) in
Next, the procedure (B5) of the image laying out step (the step S305) is carried out before the layout information generating step (the step S304) in
In this case, the layout information generating process (the step S304) in
The fourth example of the present embodiment relates to the image laying out step (the step S305) in
In the procedure (C1), all image data files to be laid out on the page concerned are analyzed to obtain the image sizes (numbers of vertical pixels and numbers of horizontal pixels) and viewing bottom orientation information. This process is carried out by an image file analyzing section 300 appearing in
In the procedure (C2), the images in the list are classified into two categories. This process is carried out by a lengthwise orientation determining section 301 and a category classifying section 305 appearing in
In the procedure (C3), the images are laid out on the page. This process is carried out by a print medium bottom orientation determining section 312 and a rotation angle determining section 313 appearing in
Here, which of the top, bottom, left, and right edges of the print medium is to be set as the bottom edge is determined as follows: First, an up-down (portrait) orientation or a left-right (landscape) orientation of the print medium is selected as a candidate according to which of such orientations has a larger number of print rectangular regions which are provided for respective images on the print medium and which have longitudinal directions that match longitudinal directions of the images to be laid out on the page after rotation when such images are rotated so that the viewing bottom orientations thereof are at the bottom edge. There are no particular limitations on the selection method used here, which may be freely determined by the designer. This selection process is carried out by the print medium bottom orientation determining section 312. After this, the rotation angles for laying out the respective images are set so that the viewing bottom orientation of every image laid out on the present page matches the determined bottom orientation of the print medium. This setting is carried out by the rotation angle determining section 313. By doing so, the viewing bottom orientation of every image can be easily matched with the bottom orientation of the print medium.
As should be clear from the above description and
In the fourth example, when printing with the layout shown in
Note that although the second, third, and fourth examples have been described with the premise of processing that generates print data in single raster units and can therefore be applied in systems having a memory with limited capacity, as can be easily understood from the above description, the processing in the layout information generating step (the step S304), the internal character string laying out step (the step S308), and the image data zooming step (the steps S504, S543, and S553) is obviously not dependent on the units in which the print data is generated.
Although, an embodiment of the present invention and several examples thereof have been described, it should be obvious that the effect of the present invention can be obtained not only when the entire image region is obtained as inputted image data by simply decoding image files but also when data for an image region designated for trimming by a digital camera or the like is handled as the inputted image data. In this case, it should be obvious that the image size obtainment and the lengthwise orientation determination for the image data should be carried out after the trimming.
It should also be obvious that the image recording apparatus according to the present invention may be any apparatus that receives image data from a host apparatus or various kinds of memories, and is not limited to a directly connectable photo printer.
In addition, although a system where a host apparatus and an image recording apparatus are connected and a system where the memory card is directly connected to an image recording apparatus have been described in the above embodiment, it should be obvious that the present invention can be applied to other systems constructed of a plurality of appliances where image data is inputted into an image recording apparatus and print data produced by laying out such image data is generated.
It is to be understood that the present invention may also be accomplished by supplying a system or an apparatus with a storage medium in which a program code of software which realizes the functions of the above described embodiment is stored, and causing a computer (or CPU or MPU) of the system or apparatus to read out and execute the program code stored in the storage medium.
In this case, the program code itself read out from the storage medium realizes the functions of the embodiment described above, and hence the program code and the storage medium in which the program code is stored constitute the present invention.
Examples of the storage medium for supplying the program code include a floppy (registered trademark) disk, a hard disk, a magneto-optical disk, an optical disc such as a CD-ROM, a CD-R, a CD-RW, a DVD-ROM, a DVD-RAM, a DVD−RW, and a DVD+RW, a magnetic tape, a nonvolatile memory card, and a ROM. Alternatively, the program code may be supplied by downloading via a network.
Further, it is to be understood that the functions of the above described embodiment may be accomplished not only by executing a program code read out by a computer, but also by causing an OS (operating system) or the like which operates on the computer to perform a part or all of the actual operations based on instructions of the program code.
Further, it is to be understood that the functions of the above described embodiment may be accomplished by writing a program code read out from the medium, such as a storage medium, into a memory provided on an expansion board inserted into a computer or in an expansion unit connected to the computer and then causing a CPU or the like provided in the expansion board or the expansion unit to perform a part or all of the actual operations based on instructions of the program code.
This application claims priority from Japanese Patent Application No. 2004-358970 filed Dec. 10, 2004, which is hereby incorporated by reference herein.
Number | Date | Country | Kind |
---|---|---|---|
2004-358970 | Dec 2004 | JP | national |