The entire disclosure of Japanese Patent Application No. 2007-040012, filed Feb. 20, 2007 is expressly incorporated by reference herein.
1. Technical Field
The present invention relates to an image processing apparatus, an image processing method, and a program. In particular, the present invention relates to an image processing apparatus, an image processing method, and a program which lay out a layout image on a template image and output the resultant image to a print device.
2. Related Art
An image processing apparatus that stores templates for each size has been known (for example, JP-A-2005-165790).
However, in the image processing apparatus disclosed in JP-A-2005-165790, there is a problem that individual templates for each paper size should be prepared even in a case where templates of a same format or a same background are used.
An advantage of some aspects of the invention is that it provides an image processing apparatus, an image processing method, and a program capable of laying out a layout image on a template image and outputting the resultant image to a print device.
According to a first aspect of the invention, there is provided an image processing apparatus that lays out a layout image on a template image and outputs a resultant image to a print device. The image processing apparatus includes: a template image storing unit that stores the template image, the aspect ratio of the template image, and information representing a resize area that is a part or the whole of the area of the template image and resizes the template image in the vertical or horizontal direction are stored in correspondence with one another; a paper aspect ratio storing unit that stores the aspect ratio of paper in correspondence with the type of the paper used by the print device; a template image designating unit that receives designation of the template image stored in the template image storing unit and displays the designated template image on a display screen; a paper designating unit that receives designation of the type of the paper used for the print device; and a resized template image generating unit that generates a resized template image in which the vertical or horizontal length of the template image is resized in accordance with a resize ratio by calculating at least one resize ratio between a vertical resize ratio and a horizontal resize ratio for matching the aspect ratio of the template image of which designation has been received by the template image designating unit to the aspect ratio of the paper of which designation has been received by the paper designating unit and resizing the resize area of the template image. The template image designating unit displays the resized template image generated by the resized template image generating unit on the display screen. Accordingly, one template image can be commonly used for paper sheets having different aspect ratios. Thus, a plurality of templates of a same form or a same background for each size of paper or each aspect ratio is not required to be stored, and therefore, it is possible to save the amount of a disk by reducing the number of processes for generating and maintaining template images.
The image processing apparatus may further include a resize area extracting unit that extracts the resize area of the template image and stores information representing the extracted resize area in the template image storing unit in correspondence with the template image in a case where the designation of the template image that does not have the information representing the resize area has been received by the template image designating unit, wherein the template image storing unit additionally stores a template image that does not have information representing the resize area. In such a case, the template image can be stored without designating the resize area thereof.
The resize area extracting unit may extract an area in which the layout image is not laid out as the resize area. In such a case, the resize template image can be generated in a speedy manner when the resized template image is generated without resizing the laid-out layout image in a case where the layout image is laid out on the template image.
The resizing template image generating unit may be configured to generate the resized template image in which the vertical length or horizontal length of the template image is resized in accordance with the resize ratio by resizing the resize area of the template image when designation of the paper is received by the paper designating unit in a case where the template image on which the layout image is laid out is displayed on the display screen, and the template image designating unit may be configured to display the resized template image on which the layout image without resizing is laid out on the display screen. In such a case, the resized template image can be generated without resizing a laid-out layout image even in a case where the layout image is laid out on the template image. Accordingly, a favorite image can be used as the template image.
It may be configured that the template image storing unit stores information representing a plurality of resize areas in correspondence with the template image, the resized template image generating unit generates the resized template image in which the vertical length or horizontal length of the template image is resized in accordance with the resize ratio by resizing a resize area of the template image, from among the plurality of resize areas, on which the layout image is not laid out when designation of the paper is received by the paper designating unit in a case where the template image on which the layout image is laid out is displayed on the display screen, and the template image designating unit displays the resized template image on which the layout image is laid out on the display screen. In such a case, the resized template image can be generated without resizing a laid-out layout image in a case where the layout image is laid out on the template image.
According to a second aspect of the invention, there is provided an image processing method for laying out a layout image on a template image and outputs a resultant image to a print device. The image processing method includes: storing the template image, the aspect ratio of the template image, and information representing a resize area that is a part or the whole of the area of the template image and resizes the template image in the vertical or horizontal direction are stored in correspondence with one another; storing the aspect ratio of paper in correspondence with the type of the paper used by the print device; receiving designation of the template image stored in accordance with the storing of the template image and displaying the designated template image on a display screen; receiving designation of the type of the paper used for the print device; and generating a resized template image in which the vertical or horizontal length of the template image is resized in accordance with a resize ratio by calculating at least one resize ratio between a vertical resize ratio and a horizontal resize ratio for matching the aspect ratio of the template image of which designation has been received by the generating of a resized template image to the aspect ratio of the paper of which designation has been received by the receiving designation of the type of the paper and resizing the resize area of the template image. The receiving designation of the template image displays the resized template image generated by the generating of a resized template image on the display screen. Accordingly, same advantages as in the first aspect can be acquired.
According to a third aspect of the invention, there is provided a program for controlling an image processing apparatus that lays out a layout image on a template image and outputs a resultant image to a print device. The program allows the image processing apparatus to perform: a template image storing sequence for storing the template image, the aspect ratio of the template image, and information representing a resize area that is a part or the whole of the area of the template image and resizes the template image in the vertical or horizontal direction are stored in correspondence with one another; a paper aspect ratio storing sequence for storing the aspect ratio of paper in correspondence with the type of the paper used by the print device; a template image designating sequence for receiving designation of the template image stored in accordance with the template image storing sequence and displaying the designated template image on a display screen; a paper designating sequence for receiving designation of the type of the paper used for the print device; and a resized template image generating sequence for generating a resized template image in which the vertical or horizontal length of the template image is resized in accordance with a resize ratio by calculating at least one resize ratio between a vertical resize ratio and a horizontal resize ratio for matching the aspect ratio of the template image of which designation has been received by the template image designating sequence to the aspect ratio of the paper of which designation has been received by the paper designating sequence and resizing the resize area of the template image. The template image designating sequence displays the resized template image generated by the resized template image generating sequence on the display screen. Accordingly, same advantages as in the first aspect can be acquired.
The above-described summary does not enumerate all the aspects of the present invention, and a sub combination of groups of the aspects can constitute the invention.
The invention will be described with reference to the accompanying drawings, wherein like numbers reference like elements.
Hereinafter, embodiments of the present invention will be described. However, the embodiments described below are not for the purpose of limiting the invention corresponding to the claims. In addition, it cannot be determined that the combinations of all the aspects described in the embodiments are essential as solving means of the invention.
In the template image storing unit 100, a template image, an aspect ratio which is a ratio of the vertical length of the template image to the horizontal length, and information representing a resize area (hereinafter, referred to as a resize area) which is an area in which the template image is expanded or contracted in the vertical or horizontal direction are stored in correspondence with one another. For example, in the example shown in
The information “X(x1 to x2)” representing the resize area which is stored in the template image storing unit 100 represents a resize area which is defined by a start point “x1 (%)” and an end point “x2 (%)” in a case where the whole length of the template image in the horizontal direction is set to be 100% and divides the template image in the vertical direction. In particular, in the example shown in
In the template image storing unit 100, in the example shown in
In addition, in the template image storing unit 100, in the example shown in
The resize area is set for each template, for example, by a manufacturer of the template image. When a resize area is to be set for a template image, if an image such as a character that is required not to be transformed by resizing is drawn on the template image, it is preferable that an area excluding the image is set to be a resize area. For example, in the example shown in
In the paper aspect ratio storing unit 110, the aspect ratios of paper are stored in correspondence with the types of paper to be printed by the printer 20. For example, in the example shown in
The template image designating unit 130 receives designation of a template image stored in the template image storing unit 100 and displays the designated template image on the display 14. In the example shown in
The paper designating unit 140 receives designation of the type of paper to be used by the printer 20. In the example shown in
The layout image designating unit 160 receives designation of a layout image stored in the layout image storing unit 120 and lays out the designated layout image on the template image for display. In the example shown in
The resized template image generating unit 150 calculates at least one resize ratio between a vertical resize ratio and a horizontal ratio for matching the aspect ratio of the template image of which designation is received by the template image designating unit 130 to the aspect ratio of the paper of which designation is received by the paper designating unit 140 and resizes the resize area of the template image, and thereby generating a template image (hereinafter, referred to as a resized template image) in which the vertical length or horizontal length of the template image is resized in accordance with the resize ratio by resizing the resize area of the template image. The template image designating unit 130 displays the resized template image generated by the resized template image generating unit 150 on the display 14.
When the template image on which the layout image is laid out by the layout image designating unit 160 is displayed on the display 14, it is preferable that the resized template image generating unit 150 does not resize the layout image. For example, in a case where the layout image is laid out in the resize area of the template image, the resized template image generating unit 150 generates a resized template image in which the vertical length or horizontal length of the template image is resized in accordance with the calculated resize ratio by resizing the resize area of the template image without resizing the layout image when designation of the type of paper is received by the paper designating unit 140. In addition, for example, in a case where a layout image is laid out in a resize area of the template image having a plurality of resize areas, when designation of the type of paper is received by the paper designating unit 140, the resized template image generating unit 150 may generate a resized template image in which the vertical length of horizontal length of the template image is resized in accordance with the calculated resize ratio by resizing resize areas, in which the layout image is not laid out, among the plurality of resize areas. When the resized template image is generated by the resized template image generating unit 150, the template image designating unit 130 displays the resized template image, on which the layout image is laid out, on the display 14.
In a storage medium 70, application software (hereinafter, referred to as “main image processing software”) relating to an image process for performing operations of the template image storing unit 100, the paper aspect ratio storing unit 110, the layout image storing unit 120, the template image designating unit 130, the paper designating unit 140, the resized template image generating unit 150, and the layout image designating unit 160 is stored. The personal computer 10 may allow the resized template image generating unit 150 and the like to perform operations by installing the main image processing software stored in the storage medium 70. In addition, as another method, the personal computer 10 may acquire the main image processing software through a network.
Following Step S100, the template image designating unit 130 reads out the template image for which designation has been received from the template image storing unit 100 and displays the template image (S110). In addition, the template image designating unit 130 acquires and temporarily stores the aspect ratio of the template image and information representing a resize area which are stored in the template image storing unit 100 in correspondence with the template image.
The paper designating unit 140 receives designation of the type of paper that can be used for the printer 20 (S130). The paper designating unit 140 acquires and temporarily stores the aspect ratio of the paper which is stored in the paper ratio storing unit 110 in correspondence with the paper.
The resized template image generating unit 150 acquires the aspect ratio of the template image temporarily stored in the template image designating unit 130 and the aspect ratio of the paper temporarily stored in the paper designating unit 140 and determines whether the aspect ratio of the template image and the aspect ratio of the paper are matched with each other (S140).
When determining that the aspect ratio of the template image and the aspect ratio of the paper are not matched to each other in Step S140 (S140: No), the resized template image generating unit 150, first, calculates at least one resize ratio between the vertical resize ratio and the horizontal resize ratio that match the aspect ratio of the template image to the aspect ratio of the paper (S150). Then, the resized template image generating unit 150 generates a resized template image in which the vertical length or the horizontal length of the template image is resized in accordance with the resize ratio calculated in Step S150 by resizing the resize area represented by information representing the resize area which is temporarily stored in the template image designating unit 130 (S160). After Step S160, the template image designating unit 130 displays the resized template image generated in Step S160, instead of the template image displayed in Step S110, on the display 14 (S170). Then, the process shown in the flowchart is completed.
On the other hand, when determining that the aspect ratio of the template image and the aspect ratio of the paper are matched to each other in Step S140 (S140: Yes), the resized template image generating unit 150 skips Steps from S150 to S170, and the process shown in the flowchart is completed.
Accordingly, according to the process shown in this flowchart, one template image can be commonly used for paper sheets having different aspect ratios. Thus, a plurality of templates of a same form or a same background for each size of paper or each aspect ratio is not required to be stored, and therefore, it is possible to save the amount of a disk by reducing the number of processes for generating and maintaining template images.
In the process shown in this flowchart, the layout image designating unit 160 may be configured to receive designation of a layout image and display the layout image laid out on the template image displayed in Step S110. When the designation of the layout image is received by the layout image designating unit 160, in Step S160, the resized template image generating unit 150 generates the resized template image without resizing a layout image in a case where the layout image is laid out on the template image. Subsequently in Step S170, the template image designating unit 130 displays the generated resized template image on the display 14. Subsequently, the template image designating unit 130 lays out the layout image on the resized template image and displays the resultant image on the display 14. In Step S160, when the layout image is laid out in the resize area, the resized template image generating unit 150 may generate the resized template image after excluding the layout image from the resize area. In addition, for example, when the template image has a plurality of resize areas, the resized template image generating unit 150 may generate the resized template image by resizing a resize area, in which the layout image is not laid out, among the plurality of resize areas. Accordingly, the resized template image can be generated in a speedy manner.
Alternatively, the resized template image generating unit 150 may generate a resized template image 414, shown in
The resize area extracting unit 170 extracts a resize area of a template image when designation of the template image not having information representing the resize area is received by the template image designating unit 130. The resize area extracting unit 170, for example, may extract an area excluding an image as a resize area in a case where the image such as a character of which deformation due to resizing is not wanted is drawn on the template image. In addition, for example, the resize area extracting unit 170 may extract an area excluding an area in which the layout image of the template image is laid out as a resize area. The resize area extracting unit 170 stores information representing the extracted resize area in the template image storing unit 100 in correspondence with the template image. In other words, in the template image storing unit 100 of the personal computer 10 shown in
After Step S200, the template image designating unit 130 reads out the template image, of which designation has been received, from the template image storing unit 100 and displays the template image (S210). For example, the template image designating unit 130 reads out a template image 420, as shown in
The resize area extracting unit 170 extracts an area in which an image such as a character whose deformation due to resizing is not wanted is drawn, from the template image of which designation has been received in Step 200, by using a known technique such as a feature point detection method (S215). The resize area extracting unit 170 extracts an area excluding the extracted area in which an image whose deformation due to resizing is not wanted is drawn and the area in which the layout image is laid out as a resize area (same step). For example, in the example shown in
The layout image designating unit 160 receives designation of a layout image, lays out the layout image on the template image, and displays the resultant image (S225). The paper designating unit 140 receives designation of the type of paper used for the printer 20 (S230). The paper designating unit 140 acquires and temporarily stores the aspect ratio of the paper which is stored in the paper aspect ratio storing unit 110 in correspondence with the paper.
The resized template image generating unit 150 determines whether the aspect ratio of the template image and the aspect ratio of the paper are matched to each other (S240). Operations from Step S250 to Step S270 performed when the resized template image generating unit 150 determines that the aspect ratio of the template image and the aspect ratio of the paper are not matched to each other in S240 (S240: No) are the same as those from Step S150 to Step S170 shown in
As described above, according to the process shown in this flowchart, a template image can be resized even in a case where the template image is stored without designation of a resize area and used for paper sheets having different aspect ratios.
When the template image designating unit 130 receives designation of the template image again in Step S200 after the resize area extracting unit 170 extracts and stores the resize area of the template image in Step S215, Step S215 is not required to be performed again. When the resize area extracting unit 170 does not perform Step S215 again, for example, the template image designating unit 130 acquires and temporarily stores the aspect ratio of the template image and the information representing the resize area stored in advance in Step S200 again.
As described above, according to this embodiment, a template of any aspect ratio can be commonly used for paper sheets having different aspect ratios. Thus, there is no need for storing templates of a same format or a same background for each size of paper or each aspect ratio, and, accordingly, it is possible to save the capacity of the disk by reducing the number of processes for generating and maintaining the templates.
Although embodiments of the present invention have been described, the technical scope of the invention is not limited thereto. It is apparent to those skilled in the art that various changes or modifications can be made in the above-described embodiments. It is apparent from the following claims that such changed or modified embodiments belong to the technical scope of the invention.
Number | Date | Country | Kind |
---|---|---|---|
2007-040012 | Feb 2007 | JP | national |