Method and system for rendering a transparent object in an image

A system, method and article are associated with receiving raster operation objects. If a first exclusive OR raster operation object, a copy raster operation object and a second exclusive OR raster operation object are received, shape data associated with either the first or second exclusive OR raster operation object is selected. Additionally, color data associated with either the first or second exclusive OR raster operation object is selected and mask data associated with the copy raster operation object is selected to render a transparent image.

TECHNICAL FIELD

This disclosure relates to graphics processing and, more particularly, to rendering transparent images with a printing device.

BACKGROUND

Printing devices often render images from data received from computer systems or other types of digital devices. The received data may be provided in a specialized language. For example, the data may comply with a page description language (PDL) that specifies the arrangement of a printed page through commands from the computer system that the printing device carries out. A PDL may describe page elements such as geometrical objects (e.g., lines, arcs, etc.). Furthermore, a PDL may define page elements independent of printer type so that pages are consistently rendered across different types of printers. The printer itself typically processes PDL commands and data to produce the images to be rendered. For example, the printer may process PDL commands for rendering a transparent image.

Unfortunately, a considerable amount of printer processing time and memory may be needed which may tax the printer.

SUMMARY OF THE DISCLOSURE

In one exemplary embodiment, the present invention relates to a method that includes receiving a first exclusive OR raster operation object, a copy raster operation object and a second exclusive OR raster operation object. The first exclusive OR raster operation object matches the second exclusive OR raster operation object. The method also includes selecting shape data associated with either the first or second exclusive OR raster operation object. The method also includes selecting color data associated with either the first or second exclusive OR raster operation object. The method also includes selecting mask data associated with the copy raster operation object. The selected data is used to render a transparent image.

In another exemplary embodiment, the present invention relates to an article that includes a storage medium that stores instructions that when executed by a machine result in the following operations: receiving a first exclusive OR raster operation object, receiving a copy raster operation object, and receiving a second exclusive OR raster operation object. The first exclusive OR raster operation object matches the second exclusive OR raster operation object. The storage medium also stores instructions that when executed by the machine result in the following operations: selecting shape data associated with either the first or second exclusive OR raster operation object, selecting color data associated with either the first or second exclusive OR raster operation object and selecting mask data associated with the copy raster operation object to render a transparent image.

In another exemplary embodiment, the present invention relates to a system including an image processor that receives raster operation objects. If a first exclusive OR raster operation object, a copy raster operation object and a second exclusive OR raster operation object are received, the image processor selects shape data associated with either the first or second exclusive OR raster operation object, selects color data associated with either the first or second exclusive OR raster operation object and selects mask data associated with the copy raster operation object.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

Referring toFIG. 1, there is shown an exemplary printing device10and a computer system12capable of sending commands and data to the printing device for rendering images. Printing device10may be coupled to computer system12by a cable14(e.g., a parallel printer cable, a universal serial bus cable, a network cable, etc.). Alternatively, printing device10and computer system12may communicate using a wireless technique (e.g., infrared (IR) link, radio frequency (RF) link, etc.). Printing device10is one type of image forming device for affixing images on a media. Image forming devices herein may include, e.g., electrophotographic printers, ink-jet printers, dye sublimation printers, thermal wax printers, electrophotographic copiers, electrophotographic multi-function devices, electrophotographic facsimile machines, or other types of image forming devices.

Exemplary printing device10may accept textual and/or graphical information from a computing device and may transfer the information to various forms of media (e.g., paper, cardstock, transparency sheets, etc.). In this embodiment, the textual and/or graphical information along with other data (e.g., files, executable instructions, etc.) may be stored on a storage device16(e.g., hard drive, CD-ROM, etc.). Additionally, printing device10may accept input directly from a removable storage device (e.g., a thumb drive, a memory card, etc.). Further, printing device10may receive a printer cartridge that may use various types of image-forming substances (e.g., toner, ink, dye, wax, etc.) for transferring textual and graphical information.

Referring toFIG. 2, computer system12may include various hardware and software components for executing instructions for sending commands and data to printing device10. For example, computer system12may include an operating system18, one or more executable applications20, a printer driver22and an input/output (I/O) device24(e.g., an I/O circuit card, etc.). To receive commands and data from computer system12, printing device10may include an I/O device26. Additionally, printing device10may include an image processor28, a memory30and a print engine32. Other embodiments of computer system12and/or printing device10may include additional or fewer hardware and/or software components.

By executing one or more applications (e.g., a word processor, a spreadsheet, a graphics editing package, etc.) various types of graphics and/or text may be produced and presented on a display screen. In some instances a user may want to print a hardcopy of the graphics and/or text. Based on operations executed by operating system18, applications20and/or printer driver22, commands and data (collectively referred to as objects) may be produced for transferring the graphics and text to printing device10via I/O device24. Printer driver22is generally used to interface a particular printer (e.g., printing device10) with one or more data formats expected to be encountered. Printer driver22may also perform various conversion operations before printing objects are sent to printing device10. For example, PDL objects may be sent over cable14to printing device10. These PDL objects may describe shapes to be rendered using coordinates and primitives such as rectangles, vectors, circles, and/or polygons. Text may be described by designating characters and fonts rather than describing the appearance of the characters. PDL objects may also represent operations to be performed on the shapes, such as indicating that a particular shape may be partially (or completely) transparent. For example, some PDL objects may include one or more raster operations (ROP). In general a ROP is a logical operation performed on image data. For example, a sequence of objects (e.g., PDL objects) with ROPs may be sent to printing device10so that one rendered graphical shape may be positioned upon another shape and may appear transparent.

Printing device10may receive PDL objects from computer system12via I/O device26. The PDL objects may be provided to image processor28for processing in preparation of rendering one or more images on a media (e.g., paper, transparency, etc.). As the PDL objects are received, the objects are parsed and may be stored in a display list34that is stored in memory30. By storing objects in display list34, data associated with the objects may be used in combination when executing operations. For example, a sequence of PDL objects may be detected and used to produce an object that appears transparent. As objects are used to execute associated commands, display list34may grow until a page is completely described. At this point the page may be considered closed and prepared to be printed. For example, the objects in display list34may be rasterized and passed to print engine32for actual printing.

In this embodiment, display list34is stored in memory30that may include non-volatile memory, volatile memory, or other type of memory capable of electronically storing information. For example, memory30may include random access memory (RAM), read-only memory (ROM), static memory (e.g., SRAM), dynamic memory (e.g., DRAM) or other type of memory (e.g., non-volatile RAM (NVRAM)) or combinations of memory types. In some embodiments memory30may also include a storage device that may implement one or more data storing techniques. For example, memory30may include a hard drive, CD-ROM, or other type of type of data storage device.

Image processor28may use various processing techniques. For example, image processor28may be implemented as one or more general programmable processors (e.g., a microprocessor, etc.) and/or one or more specialized programmable processors (e.g., an application specific integrated circuit (ASIC), field programmable gate array (FPGA), etc.).

Referring toFIG. 3, as mentioned above, a series of ROPs may be sent to printing device10so that one graphical shape appears transparent with respect to shapes positioned beneath. For example, a circular shape36may be positioned upon a rectangular shape38. As illustrated, circular shape36may be filled with one style of cross-hatching while rectangular shape38may be filled with an opposite style cross-hatching. As evidenced by the two opposing styles of cross-hatching in object40, circular shape36appears transparent when positioned in front of rectangular shape38.

Conventionally, to produce a transparent object (e.g., object40) a series of three objects that each include a ROP may be sent to printing device10. For example, the first object may include a ROP for requesting that a logical exclusive OR operation be performed. The exclusive OR operation, known as ROP90, may be performed between an image60and a destination62, as shown inFIG. 5. The image60may be represented by particular attributes (e.g., color, shape, etc.) and the destination may represent any images64(or none) present on a desired page location. The second object may include a ROP for requesting a copy operation. This ROP, referred to as ROP240, provides a shape66that may be assigned a particular color (e.g., black, represented inFIG. 5as vertical lines) and may have an associated mask68. In general a mask68may be used to render (or not render) a specific set of image pixels into a destination area of desired page location, and with respect toFIG. 5is used to not render pixels from shape66to the desired page location. A third object used to produce a transparent object is another exclusive OR operation (another ROP90). To produce the transparent object, the attributes of this second ROP90may need to match the attributes of the previous ROP90. For example, attributes such as shape, color, destination, etc. that are associated with both instances of ROP90may need to match. As can be seen inFIG. 5, the second ROP90object, when operating on same destination62as the first ROP object, results in a portion of the resulting image40to include a portion, the triangle, from the image64of original destination62, thereby resulting in the area of image60over such triangular portion being transparent.

So, a sequence of three objects with ROPs may be sent from computer system12to printing device10to produce a transparent image. Each ROP may be associated with an object that may be a relatively large image. In such a situation, a significant portion of memory30(shown inFIG. 2) may be needed to store the three objects in display list34. Additionally a significant portion of memory used for rendering images may be needed. Furthermore, executing operations associated with the three ROPs may considerably tax the processing capabilities of image processor28(also shown inFIG. 2).

By reducing the number of objects needed to produce a transparent image, the amount of memory needed by display list may be reduced. Due to this memory conservation, additional objects, data or other information may be stored in memory30. Additionally, reducing the number of ROPs to be executed correspondingly reduces the processing workload of image processor28. The conserved processing time may be used to execute other processes or functions.

Referring back toFIG. 2, to reduce the number of objects to be processed and reduce the number of ROPs to be executed, printing device10may include a transparent object manager42. In this embodiment, transparent object manager42may reside in memory30, however, in some embodiments the transparent object manager may be stored in a storage device (e.g., a hard drive, CD-ROM, etc.).

In general, transparent object manager32detects the reception of a three ROP sequence (e.g., ROP90, ROP240, ROP90) associated with producing a transparent image. Once detected, transparent object manager42may transform the three objects into a single new object having a subset of attributes of one of the ROP90objects and a subset of attributes of the ROP240object. By using this newly constructed single object, processing workload and memory needs may be reduced. Additionally, transparent object manager42may use data associated with the ROP240and one ROP90to render one image. By reducing the number of images to be rendered, processing workload and memory needs may be further reduced. Thus, a transparent image may be rendered while needing less resources of printing device10.

In this embodiment, image processor28may be located in printing device10for executing operations associated with transparent object manager42. However, in some embodiments, image processor28may be located in computer system12. By executing operations associated with transparent object manager42at computer system12, the number of objects sent from the computer system to printing device10may be reduced. Additionally, transparent object manager42may be stored in memory or storage device in communication with computer system12.

Referring toFIG. 4, a flowchart44presents some operations of transparent object manager42. Some operations may include receiving46a sequence of objects. For example, a sequence of objects, which each include a ROP, may be received by printing device10from computer system12. Some operations may also include determining if the received objects include a sequence of three ROPs (e.g., ROP90, ROP240and ROP90). As mentioned above, this sequence of three ROPs may be indicative of a transparent image being provided to printing device10for rendering. In this embodiment, to detect the reception of the three ROPs, operations may include determining48if the first object in the sequence may be ROP90. If the first object is not a ROP90, a sequence of three ROPs indicative of a transparent object may not be present. In such a situation operations may include executing50operations (e.g., render image, etc.) associated with the received object. If the first object is a ROP90, the first object may be stored in a display list (e.g., display list34). Additionally, if the first object is a ROP90, operations may include determining52if the next object is a ROP240. To make this determination, the object may be accessed to determine if the object may have been assigned the color black. Additionally, the object may be accessed to determine if the object may have been assigned a mask. If the second object is not a ROP240, operations may include executing50operations (e.g., render the image of the object, etc.) associated with the first and/or second object. If the second object is a ROP240, operations may include storing the object in the display list and determining54if the third object in the three object sequence is another ROP90. If the third object is not a ROP90, operations may include executing50operations (e.g., render image, etc.) associated with the first, second and/or third objects. If the third object is a ROP90, operations may include storing the third object in the display list and determining56if attributes of the third object match attributes of the first object. For example, attributes such as color, shape, destination, etc. of the first and third object may need to match to produce the transparent image. If the first and third objects do not match, operations may include executing50operations associated with the first, second and/or objects.

If a match is detected, operations may include rendering58an image by using the first or third objects and the second object. Since the first and third objects have been determined to be equivalent, data associated with either the first or third object may be used. Furthermore, the object (e.g., the first object, the third object) not used to provide data may be discarded. Thus, memory space and processing time may be conserved by discarding either the first or third object. Along with saving memory by transforming the three object sequence into a single object, this newly produced single object may have an attribute of being a relatively “simple” ROP (e.g., ROP240). In this embodiment, to render the transparent image, the shape data provided by the first or third object is used along with color data provided by the first or third object. Additionally, mask data associated with the second object is used by print engine32(shown inFIG. 2) to render the image.

One or more of the operations associated with flowchart44may be performed by one or more programmable processors (e.g., a microprocessor, an ASIC, etc.) such as image processor28executing a computer program. The execution of one or more computer programs may include operating on input data (e.g., data provided from a memory and/or storage device, etc.) and generating output (e.g., sending data to a computer system, etc.). The operations may also be performed by a processor implemented as special purpose logic circuitry (e.g., an FPGA (field programmable gate array), an ASIC (application-specific integrated circuit), etc.).

Operation execution may also be executed by digital electronic circuitry, or in computer hardware, firmware, software, or in combinations of them. The operations described in flowchart44may be implemented as a computer program product, e.g., a computer program tangibly embodied in an information carrier, e.g., in a machine-readable storage device (e.g., RAM, ROM, hard-drive, CD-ROM, etc.) or in a propagated signal. The computer program product may be executed by or control the operation of, data processing apparatus, e.g., a programmable processor, a computer, or multiple computers. A computer program may be written in one or more forms of programming languages, including compiled or interpreted languages, and it can be deployed in any form, including as a stand-alone program or as a module, component, subroutine, or other unit suitable for use in a computing environment. A computer program may be deployed to be executed on one computing device (e.g., controller, computer system, etc.) or on multiple computing devices (e.g., multiple controllers) at one site or distributed across multiple sites and interconnected by a communication network.