1. Field of the Invention
The present invention relates generally to processing digital images, and more particularly to a method, computer system and computer program for generating output data of a digital image that includes a transparent object.
2. Description of Related Art
A transparent object of a digital image is an object, which does not completely cover a background image behind the transparent object so that the background remains at least partially visible for a viewer. The transparency is defined as a combination of pixels of the transparent object itself with the pixels of the covered background.
The image information of one pixel is for example represented by four bytes (R, G, B, α), where R represents the intensity of the red color, G represents the intensity of the green color, B represents the intensity of the blue color, and α represents a transparency value. With this representation, every one of the three basic colors, red, green and blue, can be assigned one of 256 different intensity values.
The appearance of the pixel is defined by a superposition of all three-color intensities. The α value defines the transparency of a pixel, which can assume 256 values between completely opaque and completely transparent. In the following description, the term transparent is to be understood as covering all degrees of transparency apart from totally opaque.
FIG. 1 illustrates a first example of a digital image 100 that includes a transparent object 101. A background object 105 is covered by transparent object 101, but background object 105 remains at least partially visible to the viewer. The representation of the image area of transparent object 101 therefore requires a combination of the image information of transparent object 101 with the image information of background object 105.
On output devices like common raster displays transparency is displayed using a bitmap of the background image stored in a memory and combining the pixels of the background bitmap with the pixels of the transparent object itself, pixel by pixel. For example, a process flow diagram for a known method 200 of preparing output data for outputting a digital image including at least one transparent object on a display device is shown in FIG. 2.
In input operation 250, a transparent object is input using well known input devices like a keyboard or a mouse. Obtain object bitmap operation 251 retrieves a bitmap of the transparent object. Obtain background bitmap operation 252 retrieves the background bitmap comprising the digital image without the newly input transparent object from a display memory of the display device. In most display devices, such a display memory exists in which the bitmap of the previous image not yet including the latest drawing object is stored.
Combine bitmaps operation 253 creates a new bitmap for the transparent image by combining the transparent object bitmap with the background bitmap. A pixel-by-pixel combination of the two bitmaps is performed, and the image data of the background image are overwritten by the respective pixels of the new combined object. Upon completion of operation 253, transfer image data operation 254 sends the new bitmap including the transparent object as output data to the display device.
Method 200, which generates output data for a digital image including at least one transparent object, is applicable to a raster display like a cathode ray tube or liquid crystal display. This method, however, only works with so-called “blitable” devices having back transfer capability, which means that the output data of the previous version of the digital image not yet including the transparent object can be transferred back from the output device (e.g. display) to the computing device where the digital image has been generated.
Method 200 (FIG. 2) therefore cannot be used for most types of printer devices. Most printer drivers have no back transfer capabilities and do not offer the possibility to retrieve the bitmap from an earlier generated output, i.e. the previous image without the transparent object.
A common solution to this problem is a method 300 illustrated in FIG. 3. Operations 250 and 251 are the same as those in method 200 and so that description is incorporated herein by reference.
However, since the background bitmap cannot be transferred back from the output device, reconstruct background bitmap operation 301 reconstructs the background bitmap from a display command list which stores all display commands of the present digital image. Based on the stored background bitmap and the object bitmap, the output data is generated by a pixel-by-pixel combination in combine bitmaps operation 253. The resulting data are transferred in transfer image data operation 254 to an output device as for example a printer.
The main drawbacks of the method illustrated in FIG. 3 are large memory consumption for storing the bitmap for the combination process, sometimes called the rendering process, and the high bandwidth requirements for transferring the output image as a bitmap to the output device. Depending on the transparent object and the background large parts or even the complete display area have to be stored as a bitmap, rendered, and then transferred to the output device. This is in particular undesirable for printers like for example PostScript printers where every output pixel is represented in an ASCII mode. This means that every pixel of the bitmap is represented by characters, each requiring at least one byte of memory space.
The area of the digital image, which has to be stored as a bitmap for performing the combination process described above, is now shown by way of three different examples illustrated in FIGS. 1, 4 and 5.
Since a bitmap is a rectangular area, the image area to be rendered is at least a smallest rectangular area 102 completely covering the transparent object 101. In the example shown in FIG. 1, only object 105 is affected by the transparent object and is completely included in image area 102. Therefore, area 102 has to undergo the combination process.
In the example of FIG. 4, however, two background objects 403, 404 are partly covered by transparent object 401. The objects of a digital image 400, like objects 403, 404, are in an output file normally represented in a polygon representation, which means the image information is defined by display commands including the positions of the corner points of the object and the color of the object area. For larger objects, this representation requires much less memory space than a pixel-by-pixel bitmap representation. For generating the output file including a transparent object 401, however, the bitmap representation of the transparent object 401 as well as of the objects 403, 404 that are affected by transparent object 401 is necessary to avoid discontinuities of appearance. Therefore, the image area for which the combination process has to be carried out in the example of FIG. 4 is a rather large area 402. Memory consumption and bandwidth requirements therefore increase.
In the example of FIG. 5, digital image 500 includes a background 504, for example background color or background pattern. Digital image 500 may be, for example, a presentation slide having a background in the typical corporate design color, a text portion 508 and a logo 501, which in this example is the transparent object. Since transparent object 501 is positioned on background 504, the image area stored as a bitmap is complete digital image 500 because the background object is represented as one object in a typical output file. The memory and bandwidth requirements for carrying out the process of FIG. 3 in the example of FIG. 5 are therefore enormous.
USPTO Backgrounds
USPTO Backgrounds