Abstract:
An image printing method is disclosed for applications in printer drivers and printers. The image printing method performs various image processing such as shrinking, magnification, and cutting on an image using the printer driver. The processed image is sent via several packets to the printer for the printer to perform relevant image processing. This saves a lot of memory space. Moreover, the transmission time between the printer driver and the printer is reduced.

Description:
BACKGROUND OF THE INVENTION  
       [0001]     1. Field of Invention  
         [0002]     The invention relates to a printing method for printer drivers and printers and, in particular, to an image printing method.  
         [0003]     2. Related Art  
         [0004]     When using a printer to print an image, the printer driver has to transmit the original image to the printer. If one wants to print a shrunk or magnified image, the printer driver has to shrink or magnify it first before sending the image to the printer for printing. If the image should be cut, the printer driver also does the job after shrinking or magnification and before sending it to the printer.  
         [0005]     Of course, if the magnification ratio between the resulting image and the original image is too large, a lot of memory space will be used for storage. The transmission time for sending the image from the printer driver to the printer is also longer. The processing time therefore cannot be reduced.  
       SUMMARY OF THE INVENTION  
       [0006]     A primary objective of the invention is to provide an image printing method that reduces the usage of memory space and the transmission time between the printer driver and the printer. The processing speed can thus be increased.  
         [0007]     The disclosed image printing method is used in printer drivers and printers. Here we define the original, the resulting image, the cutting block, and the correspondence block. The original image is the initial image for the printer driver to process. The original image data include an original initial point, an original length, and an original width. The resulting image is the image obtained after the printer driver magnifies and shrinks the original image. The resulting image data include a resulting initial point, a resulting length, and a resulting width. The cutting block is the image cut from the resulting image. The area correspondence relation between the correspondence block and the original image is the same as the area correspondence relation between the cutting block and the resulting image.  
         [0008]     According to the disclosed method, the printer driver first obtains original image data, resulting image data, and cutting block data. The printer driver computes a resizing ratio between the resulting image data and the original image data. The printer driver further confirms that the resizing ratio is greater than one.  
         [0009]     Afterwards, the printer driver computes the intersection of the resulting image and the cutting block to obtain the cutting block. The printer driver then uses the area correspondence relation between the cutting block data and the resulting image data to compute the correspondence block data that has the same area correspondence relation with the original image data. The printer driver computes an error displacement according to the cutting block data and the correspondence block data. Afterwards, the printer driver transmits the correspondence block data, the error displacement, and the resizing ratio to the printer.  
         [0010]     After the printer receives the correspondence block data, the error displacement, and the resizing ratio, it performs image magnification and block cutting accordingly. Finally, the printer prints the cutting block.  
         [0011]     The image processed by the printer driver is sent to the printer for the printer to perform relevant image processing. This saves a lot of memory space. The transmission time between the printer driver and the printer is thus shortened.  
     
    
     BRIEF DESCRIPTION OF THE DRAWINGS  
       [0012]     The invention will become more fully understood from the detailed description given hereinbelow illustration only, and thus are not limitative of the present invention, and wherein:  
         [0013]      FIG. 1  shows schematic views of the original image and the resulting image;  
         [0014]      FIGS. 2A and 2B  are flowcharts of the disclosed image printing method;  
         [0015]      FIG. 3  is a schematic view of the original image, the resulting image, the cutting block, and the correspondence block; and  
         [0016]      FIGS. 4A, 4B ,  4 C are another set of flowcharts of the disclosed image printing method. 
     
    
     DETAILED DESCRIPTION OF THE INVENTION  
       [0017]     The disclosed image printing method is used in printer drivers and printers.  
         [0018]     With reference to  FIG. 1 , the original image  10  is the initial image the printer driver processes. The original image  10  includes an original initial point (SrcX,SrcY), an original length (SrcY), and an original width (SrcX). The resulting image  20  is the image obtained after the printer driver resizes the original image. It contains a resulting initial point (DestX, DestY), a resulting length (DestY), and a resulting width (DestX).  
         [0019]     The flowcharts of the disclosed image printing method are shown in  FIGS. 2A and 2B . They show the procedure of shrinking or magnifying the original image. The method includes the following steps, with simultaneous reference to  FIG. 1  for the original image and the resulting image.  
         [0020]     First, the printer driver obtains the data of the original image and the resulting image (step  101 ). The data contained therein have been described before. The printer driver uses the original image and the resulting image to compute a resizing ratio (step  102 ). That is, a shrinking or magnifying power is computed by taking the original image as the standard. The printer driver then confirms the resizing ratio is greater than one (step  103 ). If it is greater than one, the original image has to be magnified to obtain the resulting image, followed by performing step  104 . If it is not greater than one, the original image has to be shrunk to obtain the resulting image. Therefore, the printer driver shrinks the original image to obtain the resulting image (step  108 ). The printer driver transmits the resulting image to the printer (step  109 ). The printer receives the resulting image (step  110 ) and prints the resulting image (step  111 ). Therefore, the printer can print the resulting image once it is obtained after performing image shrinkage by the printer driver.  
         [0021]     The printer driver transmits the original image data and the resizing ratio to the printer (step  104 ) for subsequent processes. The printer then receives the original image data and the resizing ratio (step  105 ). The printer magnifies the original image according to the resizing ratio to obtain the resulting image (step  106 ). Finally, the printer prints the resulting image (step  107 ).  
         [0022]     After the printer driver performs image processing on the original image, the result is transmitted to the printer. Afterwards, the printer performs related image processing. This solves the problem of large memory space wasting. The transmission time between the printer driver and the printer can be largely saved.  
         [0023]     With reference to  FIG. 3 , the original image  10  is the initial image being processed by the printer driver. The data of the original image  10  include an original initial point (SrcX,SrcY), an original length (SrcY), and an original width (SrcX). The resulting image  20  is the image obtained after the printer driver resizes the original image. The data of the resulting image  20  include a resulting initial point (DestX, DestY), a resulting length (DestY), and a resulting width (DestX). The cutting block  20  is an image cut from the resulting image  20 . The area correspondence relation between the correspondence block  30  and the original image  10  is the same as that between the cutting block  50  and the resulting image  20 .  
         [0024]      FIGS. 4A, 4B ,  4 C show another set of flowcharts of the disclosed image printing method. They shrink or magnify the original image and perform image cutting. The method includes the following steps, with simultaneous reference to  FIG. 3  for the original image, the resulting image, the cutting block, and the correspondence block.  
         [0025]     First, the printer driver obtains the data of the original image, the data of the resulting image, and the data of the cutting block (step  201 ) for subsequent processes. The printer driver uses the data of the original image and the resulting image to compute a resizing ratio (step  202 ). That is, a shrinking or magnifying power is computed by taking the original image as the standard.  
         [0026]     The printer driver then confirms the resizing ratio is greater than one (step  203 ). If it is greater than one, the original image has to be magnified to obtain the resulting image, followed by performing step  204 . If it is not greater than one, the original image has to be shrunk to obtain the resulting image. Therefore, the printer driver shrinks the original image according to the resizing ratio to obtain the resulting image (step  211 ). The printer driver cuts the resulting image according to the cutting block data (step  212 ). The printer driver transmits the cutting block to the printer (step  213 ). The printer receives the cutting block (step  214 ) and prints the cutting block (step  215 ). Therefore, the printer can print the cutting block once it is obtained after performing image shrinkage and image cutting by the printer driver.  
         [0027]     The printer driver computes the intersection of the resulting image and the cutting block to obtain the cutting block (step  204 ). The printer driver then uses the area correspondence relation between the cutting block data and the resulting image data to compute the correspondence block data that has the same area correspondence relation with the original image data (step  205 ). That is, the image processing makes use of the area correspondence relation between the cutting block data and the resulting image data to obtain that between the original image and the correspondence block.  
         [0028]     The printer driver computes an error displacement according to the cutting block data and the correspondence block data (step  206 ). As shown in the drawing, if the resizing ratio is 3 (i.e. magnifying by a factor of 3), the lines L 1 , L 2 , and L 3  in the original image are also magnified by a factor of 3. The second line of L 3  is the effective line, which is the error displacement OffsetY in length. The width is analogous.  
         [0029]     The printer driver transmits the correspondence block data, the error displacement, and the resizing ratio to the printer (step  207 ). Afterwards, the printer receives the correspondence block data, the error displacement, and the resizing ratio (step  208 ). The printer uses the resizing ratio and the error displacement to magnify and cut the correspondence block into the cutting block (step  209 ). Finally, the printer prints the cutting block (step  210 ).  
         [0030]     After the printer driver performs image processing on the original image, the result is transmitted to the printer. Afterwards, the printer performs related image processing. This solves the problem of large memory space wasting. The transmission time between the printer driver and the printer can be largely saved.  
         [0031]     Certain variations would be apparent to those skilled in the art, which variations are considered within the spirit and scope of the claimed invention.