User Tools

Site Tools


en:game_tech:pixel

Pixel

Computers can process information essentially only in form of numbers. While internally stored as binary numbers, the quantization in this fashion goes for basically everything computers process. That includes things such as image information and makes it necessary to introduce the concept of pixels.

Different Ways of Describing Image Contents

This makes it necessary to chose one of two approaches to describe image contents: Either the content is describable by some sort of formula (vector graphics), such as defining one point of the given surface as the center of a circle and the image consists of one circle with a given radius and color around that point. This is a sharp definition, that also a computer can work with. Or the image is described in form of regular, fixed rastered areas of the surface, with their color and opacity information for each section, also known as raster graphics. Usually this is done in a very similar fashion as is done for the well-known game sinking ships, in rows and columns of fixed height and width. This is how the image itself is describing its contents.

Displaying an Image

In any case, for display of an image any location on the surface of that image must also quantized in order to make it possible to have a concept of a location or an area, as the computer still can only send quantized information for a screen. So raster graphics kind of come naturally for computers as this is their natural way of displaying images. This means, the image displayed is always partitioned into areas, that can be addressed uniquely, similar to a mathematical coordination system. Usually that means squares, but the partitioning can also be in form of rectangles. But the source of the information can still be not-rasterized. Each sub-area resulting from that partitioning for display has exactly one color and maybe also one transparency value, all over that particular section. The entirety of these sub-areas with their unique colors and transparency values makes up the displayed image. E.g. a simple square shaped image could be partitioned into four sub-squares, 2 in one direction, and 2 in perpendicular direction (usually referred to as x- and y-direction). That makes four pixels. And it might be displayed just like this:

Each of the four squares is one pixel of the image. The size of a displayed pixel (= actual number of pixels used for display here) is a different matter. While your display most certainly will use a whole lot more pixels than four to display the image above, the fact remains: The surface of the image could be defined or described totally accurately as a 2 x 2 grid of squared, each with no alpha channel information but 24 bit color information. It could then be zoomed just as big as here, with the very same result. The PNG file used here actually has a quantization of 100 x 100, giving the size of 50 x 50 for each sub-square. (And your display may even use yet another rasterization, depending on the level of zoom and the number of pixels of your display.) So one image may be displayed differently in various so-called resolutions, depending on the case, maybe even with the very same net-result.

Resolution and Information

Vector Images Have no Resolution

Vector images (such as EPS or SVG) never lose actual information in any case (even if the result of low-resolution display may be lacking any aesthetic value). You just continue using the same formula, but change the resolution for display. The information is stored in the formula, that is to be used to derive the actual contents the computer is to calculate from it for display. And they are calculated for a given rasterization/partitioning for display. In case of vector graphics it is very well possible, that the process of displaying loses a whole information in comparison to the source material. You can take a vector graphic with a lot of fine details and display it on a raster of 10 x 10, which makes it basically a pixel soup lacking any details.

But by increasing the zoom or resolution, more details or more information can be shown. The actual image can be (re-)rastered any time for any resolution, as the image is described by a formula. So in a way you can have any level of detail shown from the image. But only one at a time and (depending on the shape) possibly never in full detail. For example, the above image could easily be described as four squares directly adjacent to one another with the given color and opacity information. This would give the exact same result, if applied to a 100 x 100 raster for display. But as raster graphics work exactly in this fashion, they will do for the task just as fine. A more elaborate shape would be a totally different matter.

Raster Images

Actual raster graphics (such as a PNG) have a fixed raster information, with color (and opacity) information for each pixel. In a way they are similar to the above described vector graphics example, of a surface filled square-by-square. Re-rastering such a raster image, however will never increase the level of detail. At worst it will be a loss of detail (when decreasing the number of rasters), that cannot be recovered later. A lowering of the resolution (rougher partitioning) essentially means, less information available for describing the image, as the information was stored in part in the choice of rasterization. Lessening the information by re-rastering with lesser detail means, the information is lost permanently. So the number of pixels used for describing a raster image is crucial for its quality. Once set, it can never be increased back without some sort of »guessing« (e.g. extrapolation, interpolation, AI tools). But it is exactly that, at best an educated guess of what it might have looked before, with a higher level of rastering. A further decrease is always possible.

Pixel Dimensions and Actual Pixels

While a pixel is actually a sub-area of an image (having with and height) the term pixel is very often also used to refer to the dimensions of an image, describing the level of rastering detail. So the above described image with its rasterization of 100 x 100 has the size of 100 pixels x 100 pixels. This way of describing the resolution works well of practical reasons.

But still the reality is the PNG image used above actually has 10'000 pixels. So it is important to know, what is referred to as a pixel, the dimensions of an image, or the actual number of pixels making it up.

To give you an example, why that can be confusing: A 4k-Display does not have 4k or 4'000 pixels altogether. In this case the description means approximately 4'000 pixels in x-direction (usually 3'840 pixels, sometimes also 4096). This by itself also will not give you an accurate information of the actual number of pixels the display has. For that you need to know the aspect ration of the display, for example 16:9. In the latter case you can easily derive the y-raster to be 2160 pixels. So a 16:9 4k display (also known as UHD) has 3'840 x 2'160 = 8'294'400 pixels. So although the convention used for naming displays uses the x-resolution, you could just as well describe UHD as an 8 mega pixels display or 8M. It is only by convention, that the x-resolution is used for naming.

See Also

The three-dimensional pendant of the pixel is the voxel. The same principles apply, just adding one more dimension to the two described above.

[ Games Database ] [ Game Tech ]

This website uses cookies. By using the website, you agree with storing cookies on your computer. Also you acknowledge that you have read and understand our Privacy Policy. If you do not agree leave the website.More information about cookies
en/game_tech/pixel.txt · Last modified: 2024-01-07-23-23 by 7saturn

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki