FACTOID # 35: Looking for Czech and Slovak men? Half are in factories.
 
 Home   Encyclopedia   Statistics   Countries A-Z   Flags   Maps   Education   Forum   FAQ   About 
 
WHAT'S NEW
RECENT ARTICLES
More Recent Articles »
 

SEARCH ALL

FACTS & STATISTICS    Advanced view

Search encyclopedia, statistics and forums:

 

 

(* = Graphable)

 

 


Encyclopedia > Transparency (graphic)

Transparency is possible in a number of graphics file formats. The term transparency is used in various ways by different people, but at its simplest there is "full transparency" i.e. something that is completely invisible. Of course, only part of a graphic would by fully transparent, or there would be nothing to see. More complex is "partial transparency" or "translucency" where the effect is achieved that a graphic is partially transparent in the same way as colored glass. Since ultimately a printed page or computer or television screen can only be one color at a point, partial transparency is always simulated at some level by mixing colors. There are many different ways to mix colors, so in some cases transparency is ambiguous.


In addition, transparency is often an "extra" for a graphics format, and some graphics programs will ignore the transparency.


Raster file formats that support transparency include GIF, PNG, and TIFF, through either a transparent color or an alpha channel. A rotating globe in GIF format. ... A PNG image with an 8-bit transparency layer (top), overlayed onto a chequered background (bottom). ... This article is about TIFF, the computer image format. ... In computer graphics, alpha compositing is often useful to render image elements in separate passes, and then combine the resulting multiple 2D images into a single, final image in a process called compositing. ...


Most vector formats implicitly support transparency because they simply avoid puttting any objects at a given point. This includes EPS and WMF. For vector graphics this may not strictly be seen as transparency, but it requires much of the same careful programming as transparency in raster formats. EPS is an acronym which can mean: Encapsulated PostScript, a file format. ... WMF can stand for: Württembergische Metallwaren Fabrik(Wüttenbergish metalgoods factory in German) World Monuments Fund Wikimedia Foundation, the foundation that runs Wikipedia Windows Metafile Windows Media Format, also known as AVI after the container format it uses. ...


More complex vector formats may allow transparency combinations between the elements within the graphic, as well as that above. This includes SVG and PDF. Static image generated from an SVG example. ... To meet Wikipedias quality standards, this article or section may require cleanup. ...


A suitable bitmap graphics editor shows transparency by a special pattern, e.g. a chessboard pattern. A bitmap graphics editor is a computer program that allows users to paint and edit pictures interactively on the computer screen and save them in one of many popular bitmap or raster formats such as JPEG, PNG, GIF and TIFF. Usually an image viewer is preferred over a bitmap graphics...

Contents


Transparent pixels

This image has binary transparency (some pixels fully transparent, other pixels fully opaque). It can be transparent against any background because it is monochrome.
This image has binary transparency (some pixels fully transparent, other pixels fully opaque). It can be transparent against any background because it is monochrome.

One color entry in a single GIF or PNG image's palette can be defined as "transparent" rather than an actual color. This means that when the decoder encounters a pixel with this value, it is rendered in the background color of the part of the screen where the image is placed, also if this varies pixel-by-pixel as in the case of a background image. Image File history File links Binary_transparency_monochrome. ... For images in Wikipedia, see Wikipedia:Images. ...


Applications include:

  • an image that is not rectangular can be filled to the required rectangle using transparent surroundings; the image can even have holes (e.g. be ring-shaped)
  • in a run of text, a special symbol for which an image is used because it is not available in the character set, can be given a transparent background, resulting in a matching background.

The transparent color should be chosen carefully, to avoid items that just happen to be the same color vanishing.


Even this limited form of transparency has patchy implementation, though most popular web browsers are capable of displaying transparent GIF images. This support often does not extend to printing, especially to printing devices (such as PostScript) which do not include support for transparency in the device or driver. Outside the world of web browsers, support is fairly hit-or-miss for transparent GIF files. PostScript (PS) is a page description language and programming language used primarily in the electronic and desktop publishing areas. ...


Edge limitations of transparent pixels

This image has binary transparency. However, it is greyscale, with anti-aliasing, so it looks good only against a white background. Set against a different background, a "ghosting" effect from the shades of grey would result.
This image has binary transparency. However, it is greyscale, with anti-aliasing, so it looks good only against a white background. Set against a different background, a "ghosting" effect from the shades of grey would result.

The edges of characters and other images with transparent background should not have shades of grey: these are normally used for intermediate colors between the color of the letter/image and that of the background, typically shades of grey being intermediate between a black letter and a white background. However, with e.g. a red background the intermediate colors would be dark red, and grey edge pixels give an ugly and unclear result. For a variable background color there are no suitable fixed intermediate colors. Image File history File links Binary_transparency_greyscale. ... In digital signal processing, anti-aliasing is the technique of minimizing aliasing (jagged or blocky patterns) when representing a high-resolution signal at a lower resolution. ... In computing, a grayscale or greyscale digital image is an image in which the value of each pixel is a single sample. ...


Partial transparency by alpha channels

This image has partial transparency (254 possible levels of transparency between fully transparent and fully opaque). It can be transparent against any background despite being anti-aliased.
This image has partial transparency (254 possible levels of transparency between fully transparent and fully opaque). It can be transparent against any background despite being anti-aliased.

PNG and TIFF also allows partial transparency, which solves the edge limitation problem. However, support is even more patchy. Internet Explorer does not support partial transparency in a PNG graphic. Very few applications correctly process TIFF files with alpha channels. Image File history File links Alpha_transparency_image. ... Microsoft Internet Explorer, abbreviated IE or MSIE, is a proprietary graphical web browser made by Microsoft and currently available as part of Microsoft Windows. ...


A major use of partial transparency, but not the only one, is to produce "soft edges" in graphics so that they blend into their background. See also monochrome or with shades of grey and anti-aliasing. In typography, a typeface consists of a co-ordinated set of grapheme (i. ... In digital signal processing, anti-aliasing is the technique of minimizing aliasing (jagged or blocky patterns) when representing a high-resolution signal at a lower resolution. ...


The process of combining a partially transparent color with its background ("compositing") is often ill-defined and the results may not be exactly the same in all cases. For example, where color correction is in use, should the colors be composited before or after color correction?

This image shows the results of overlaying each of the above transparent PNG images on a background colour of #6080A0. Note the grey fringes on the letters of the middle image.
This image shows the results of overlaying each of the above transparent PNG images on a background colour of #6080A0. Note the grey fringes on the letters of the middle image.

Image File history File links Transparency_overlays. ...

Transparency by clipping path

An alternative approach to full transparency is to use a clipping path. A clipping path is simply a shape or outline, that is used in conjunction with the other graphics. Everything inside the path is visible, and everything outside the path is invisible. The path is inherently vector, but can potentially be used to mask both vector and bitmap data. The main usage of clipping paths is in PostScript files.


Compositing calculations

While some transparency specifications are vague, others may give mathematical details of how two colors are to be composited. This gives a fairly simple example of how compositing calculations can work, can produce the expected results, and can also produce surprises.


In this example, two greyscale colors are to be composited. Greyscale values are considered to be numbers between 0.0 (white) and 1.0 (black). To emphasise: this is only one possible rule for transparency. If working with transparency, check the rules in use for your situation.


The color at a point, where color G1 and G2 are to be combined, is ( G1 + G2 ) / 2. Some consequences of this are:

  • Where the colors are equal, the result is the same color because ( G1 + G1 ) /2 = G1.
  • Where one color (G1) is white (0.0), the result is G2/2. This will always be less than any nonzero value of G2, so the result is more white than G2. (This is easily reversed for the case where G2 is white).
  • Where one color (G1) is black (1.0), the result is (G2+1)/2. This will always be more than G2, so the result is more black than G2.
  • The formula is commutative since ( G1 + G2 ) / 2 = ( G2 + G1 ) / 2. This means it does not matter which order two graphics are mixed i.e. which of the two is on the top and which is on the bottom.
  • The formula is not associative since
 ( ( G1 + G2 ) /2 + G3 ) / 2 = G1 / 4 + G2 / 4 + G3 / 2 ( G1 + ( G2 + G3 ) / 2 ) / 2 = G1 / 2 + G2 / 4 + G3 / 4 

This is important as it means that when combining three or more objects with this rule for transparency, the final color depends very much on the order of doing the calculations. In mathematics, especially abstract algebra, a binary operation * on a set S is commutative if x * y = y * x for all x and y in S. Otherwise * is noncommutative. ... In mathematics, associativity is a property that a binary operation can have. ...


Although the formula is simple, it may not be ideal. Human perception of brightness is not linear - we do not necessarily consider that a grey value of 0.5 is halfway between black and white. Such details may not matter when transparency is used only to soften edges, but in more complex designs this may be significant. Most people working seriously with transparency will need to see the results and may fiddle with the colors or (where possible) the algorithm to arrive at the results they need.


This formula can easily be generalised to RGB color or CMYK color by applying the formula to each channel separately. For example, final red = ( R1 + R2 ) / 2. But it cannot be applied to all color models. For example Lab color would produce results that were surprising. The RGB color model utilizes the additive model in which red, green, and blue light are combined in various ways to create other colors. ... Cyan, magenta, yellow, and key (black) CMYK (or sometimes YMCK) is a subtractive color model used in color printing. ... CIE L*a*b* (CIELAB) is the most complete color model used conventionally to describe all the colors visible to the human eye. ...


Simple alpha compositing uses an alpha channel. The compositing formula is a multiplicative formula. If a grey with intensity G2 and opacity T2 overlays a grey with intensity G1 and opacity T1 the result will be a grey with intensity equal to (1 − T2) * G1 + G2, and opacity 1 − (1 − T2) * (1 − T1). To blend colors, the channels are treated independently. The SVG file specification uses this type of blending.


Transparency in PDF

Starting with version 1.4 of the PDF standard, transparency (including translucency) is supported. This is a very complex model, requiring over 100 pages to document. A key source of complication is that PDF files may contain objects with different color spaces, and blending these is tricky. PDF supports many different blend modes, not just the most common averaging method. In addition, the rules for compositing many overlapping objects allow choices, such as whether a group of objects are blended before being blended with the background, or whether each object in turn is blended into the background. A color model is an abstract mathematical model describing the way colors can be represented as tuples of numbers, typically as three or four values or color components (e. ...


Adobe Acrobat 5.0 was the first to support PDF 1.4 and, hence, transparent PDF files. Transparency in PDF was carefully designed not to cause errors in PDF viewers that did not understand it, they would simply display all elements as fully opaque. This was a two-edged sword. On the one hand, it reduced errors and complaints about errors; on the other hand it meant people with older viewers, PDF printers, etc. might print something completely different from the original design, increasing complaints about incorrect output. When PDF files are used to prepare work for professional printing, transparency issues could cause millions of printed copies to be incorrect, and have to be destroyed. Adobe Acrobat was the first software to support Adobe Systems Portable Document Format (PDF). ...


Transparency in PostScript

The PostScript language has limited support for full (not partial) transparency, depending on the PostScript level. PostScript (PS) is a page description language and programming language used primarily in the electronic and desktop publishing areas. ...


Level 1

Level 1 PostScript offers transparency via two methods:

  • A one-bit (monochrome) image can be treated as a mask. In this case the 1-bits can be painted any single color, while the 0-bits are not painted at all. This technique cannot be generalised to more than one color, or to vector shapes.
  • Clipping paths can be defined. These restrict what part of all subsequent graphics can be seen. This can be used for any kind of graphic, however in level 1, the maximum number of nodes in a path was often limited to 1500, so complex paths (e.g. cutting around the hair in a photograph of a person's head) often failed.

Level 2

Level 2 PostScript adds no specific transparency features. However, by the use of patterns, arbitrary graphics can be painted through masks defined by any vector or text operations. This is, however, complex to implement. In addition, this too often reached implementation limits, and few if any application programs ever offered this technique.


Level 3

Level 3 PostScript adds further transparency option for any raster image. A transparent color, or range of colors, can be applied; or a separate 1-bit mask can be used to provide an alpha channel.


Encapsulated PostScript

EPS files contain PostScript, which may be level 1, 2 or 3 and make use of the features above. A more subtle issue arises with the previews for EPS files that are typically used to show the view of the EPS file on screen. There are viable techniques for setting transparency in the preview. For example, a TIFF preview might use a TIFF alpha channel. However, many applications do not use this transparency information and will therefore show the preview as a rectangle. A semi-proprietary technique pioneered in Photoshop and adopted by a number of pre-press applications is to store a clipping path in a standard location of the EPS, and use that for display. Adobe Photoshop is a bitmap graphics editor (with some text and vector graphics capabilities) published by Adobe Systems. ...


In addition, few of the programs that generate EPS previews will generate transparency information in the preview.


Some programs have sought to get around this by treating all white in the preview as transparent, but this too is problematic in the cases where some whites are not transparent.


More recently, applications have been appearing that ignore the preview altogether; they therefore get information on which parts of the preview to paint by interpreting the PostScript.


See also

2D computer graphics is the computer-based generation of digital images—mostly from two-dimensional models (such as 2D geometric models, text, and digital images) and by techniques specific to them. ...

External links

  • http://www.eyewire.com/magazine/columns/sean/png/
  • Opacity Algorithm - an article on how to calculate the apparent colour when layered translucent layers engage


 

COMMENTARY     


Share your thoughts, questions and commentary here
Your name
Your comments
Please enter the 5-letter protection code

Want to know more?
Search encyclopedia, statistics and forums:

 


Lesson Plans | Student Area | Student FAQ | Reviews | Press Releases |  Feeds | Contact
The Wikipedia article included on this page is licensed under the GFDL.
Images may be subject to relevant owners' copyright.
All other elements are (c) copyright NationMaster.com 2003-5. All Rights Reserved.
Usage implies agreement with terms.