Hubbry Logo
Raster graphicsRaster graphicsMain
Open search
Raster graphics
Community hub
Raster graphics
logo
8 pages, 0 posts
0 subscribers
Be the first to start a discussion here.
Be the first to start a discussion here.
Contribute something
Raster graphics
Raster graphics
from Wikipedia
The smiley face in the top left corner is a raster image. When enlarged, individual pixels appear as squares. Enlarging further, each pixel can be analyzed, with their colors constructed through combination of the values for red, green and blue.

In computer graphics and digital photography, a raster graphic, raster image, or simply raster is a digital image made up of a rectangular grid of tiny colored (usually square) so-called pixels. Unlike vector graphics which use mathematical formulas to describe shapes and lines, raster images store the exact color of each pixel, making them ideal for photographs and images with complex colors and details. Raster images are characterized by their dimensions (width and height in pixels) and color depth (the number of bits per pixel).[1] They can be displayed on computer displays, printed on paper, or viewed on other media, and are stored in various image file formats.

The printing and prepress industries know raster graphics as contones (from "continuous tones"). In contrast, line art is usually implemented as vector graphics in digital systems.[2]

Transposing an image to covert raster organization (a relatively costly operation for packed formats with less than a byte per pixel); composing an additional raster line reflection (almost free), either before or afterwards, amounts to a 90° image rotation in one direction or the other.

Many raster manipulations map directly onto the mathematical formalisms of linear algebra, where mathematical objects of matrix structure are of central concern.

Raster or gridded data may be the result of a gridding procedure.

Etymology

[edit]

The word "raster" has its origins in the Latin rastrum (a rake), which is derived from radere (to scrape). It originates from the raster scan of cathode-ray tube (CRT) video monitors, which draw the image line by line by magnetically or electrostatically steering a focused electron beam.[3] By association, it can also refer to a rectangular grid of pixels. The word rastrum is now used to refer to a device for drawing musical staff lines.

Data model

[edit]
A simple raster graphic

The fundamental strategy underlying the raster data model is the tessellation of a plane, into a two-dimensional array of squares, each called a cell or pixel (from "picture element"). In digital photography, the plane is the visual field as projected onto the image sensor; in computer art, the plane is a virtual canvas; in geographic information systems, the plane is a projection of the Earth's surface. The size of each square pixel, known as the resolution or support, is constant across the grid.

A single numeric value is then stored for each pixel. For most images, this value is a visible color, but other measurements are possible, even numeric codes for qualitative categories. Each raster grid has a specified pixel format, the data type for each number. Common pixel formats are binary, grayscale, palettized, and full-color, where color depth[4] determines the fidelity of the colors represented, and color space determines the range of color coverage (which is often less than the full range of human color vision). Most modern color raster formats represent color using 24 bits (over 16 million distinct colors), with 8 bits (values 0–255) for each color channel (red, green, and blue). The digital sensors used for remote sensing and astronomy are often able to detect and store wavelengths beyond the visible spectrum; the large CCD bitmapped sensor at the Vera C. Rubin Observatory captures 3.2 gigapixels in a single image (6.4 GB raw), over six color channels which exceed the spectral range of human color vision.

Uses

[edit]

Image storage

[edit]
Using a raster to summarize a point pattern

Most computer images are stored in raster graphics formats or compressed variations, including GIF, JPEG, and PNG, which are popular on the World Wide Web.[4][5] A raster data structure is based on a (usually rectangular, square-based) tessellation of the 2D plane into cells, each containing a single value. To store the data in a file, the two-dimensional array must be serialized. The most common way to do this is a row-major format, in which the cells along the first (usually top) row are listed left to right, followed immediately by those of the second row, and so on.

In the example at right, the cells of tessellation A are overlaid on the point pattern B resulting in an array C of quadrant counts representing the number of points in each cell. For purposes of visualization a lookup table has been used to color each of the cells in an image D. Here are the numbers as a serial row-major array:

1 3 0 0 1 12 8 0 1 4 3 3 0 2 0 2 1 7 4 1 5 4 2 2 0 3 1 2 2 2 2 3 0 5 1 9 3 3 3 4 5 0 8 0 2 4 3 2 8 4 3 2 2 7 2 3 2 10 1 5 2 1 3 7

To reconstruct the two-dimensional grid, the file must include a header section at the beginning that contains at least the number of columns, and the pixel datatype (especially the number of bits or bytes per value) so the reader knows where each value ends to start reading the next one. Headers may also include the number of rows, georeferencing parameters for geographic data, or other metadata tags, such as those specified in the Exif standard.

Compression

[edit]

High-resolution raster grids contain a large number of pixels, and thus consume a large amount of memory. This has led to multiple approaches to compressing the data volume into smaller files. The most common strategy is to look for patterns or trends in the pixel values, then store a parameterized form of the pattern instead of the original data. Common raster compression algorithms include run-length encoding (RLE), JPEG, LZ (the basis for PNG and ZIP), Lempel–Ziv–Welch (LZW) (the basis for GIF), and others.

For example, Run length encoding looks for repeated values in the array, and replaces them with the value and the number of times it appears. Thus, the raster above would be represented as:

values 1 3 0 112 8 0 1 4 3...
lengths 1 1 2 1 1 1 1 1 1 2...

This technique is very efficient when there are large areas of identical values, such as a line drawing, but in a photograph where pixels are usually slightly different from their neighbors, the RLE file would be up to twice the size of the original.

Some compression algorithms, such as RLE and LZW, are lossless, where the original pixel values can be perfectly regenerated from the compressed data. Other algorithms, such as JPEG, are lossy, because the parameterized patterns are only an approximation of the original pixel values, so the latter can only be estimated from the compressed data.

Raster–vector conversion

[edit]

Vector images (line work) can be rasterized (converted into pixels), and raster images vectorized (raster images converted into vector graphics), by software. In both cases, some information is lost, although certain vectorization operations can recreate salient information, as in the case of optical character recognition.

Displays

[edit]

Early mechanical televisions developed in the 1920s employed rasterization principles. Electronic television based on cathode-ray tube displays are raster scanned with horizontal rasters painted left to right, and the raster lines painted top to bottom.

Modern flat-panel displays such as LED monitors still use a raster approach. Each on-screen pixel directly corresponds to a small number of bits in memory.[6] The screen is refreshed simply by scanning through pixels and coloring them according to each set of bits. The refresh procedure, being speed critical, is often implemented by dedicated circuitry, often as a part of a graphics processing unit.

Using this approach, the computer contains an area of memory that holds all the data that are to be displayed. The central processor writes data into this region of memory and the video controller collects them from there. The bits of data stored in this block of memory are related to the eventual pattern of pixels that will be used to construct an image on the display.[7]

An early scanned display with raster computer graphics was invented in the late 1960s by A. Michael Noll at Bell Labs,[8] but its patent application filed February 5, 1970, was abandoned at the Supreme Court in 1977 over the issue of the patentability of computer software.[9]

Printing

[edit]

During the 1970s and 1980s, pen plotters, using vector graphics, were common for creating precise drawings, especially on large format paper. However, since then almost all printers create the printed image as a raster grid, including both laser and inkjet printers. When the source information is vector, rendering specifications and software such as PostScript are used to create the raster image.

Three-dimensional rasters

[edit]

Three-dimensional voxel raster graphics are employed in video games and are also used in medical imaging such as MRI scanners.[10]

Geographic information systems

[edit]

Geographic phenomena are commonly represented in a raster format in GIS. The raster grid is georeferenced, so that each pixel (commonly called a cell in GIS because the "picture" part of "pixel" is not relevant) represents a square region of geographic space.[11] The value of each cell then represents some measurable (qualitative or quantitative) property of that region, typically conceptualized as a field. Examples of fields commonly represented in rasters include: temperature, population density, soil moisture, land cover, surface elevation, etc. Two sampling models are used to derive cell values from the field: in a lattice, the value is measured at the center point of each cell; in a grid, the value is a summary (usually a mean or mode) of the value over the entire cell.

Resolution

[edit]

Raster graphics are resolution dependent, meaning they cannot scale up to an arbitrary resolution without loss of apparent quality. This property contrasts with the capabilities of vector graphics, which easily scale up to the quality of the device rendering them. Raster graphics deal more practically than vector graphics with photographs and photo-realistic images, while vector graphics often serve better for typesetting or for graphic design. Modern computer-monitors typically display about 72 to 130 pixels per inch (PPI), and some modern consumer printers can resolve 2400 dots per inch (DPI) or more; determining the most appropriate image resolution for a given printer-resolution can pose difficulties, since printed output may have a greater level of detail than a viewer can discern on a monitor. Typically, a resolution of 150 to 300 PPI works well for 4-color process (CMYK) printing.

However, for printing technologies that perform color mixing through dithering (halftone) rather than through overprinting (virtually all home/office inkjet and laser printers), printer DPI and image PPI have a very different meaning, and this can be misleading. Because, through the dithering process, the printer builds a single image pixel out of several printer dots to increase color depth, the printer's DPI setting must be set far higher than the desired PPI to ensure sufficient color depth without sacrificing image resolution. Thus, for instance, printing an image at 250 PPI may actually require a printer setting of 1200 DPI.[12]

Raster-based image editors

[edit]

Raster-based image editors, such as PaintShop Pro, Corel Painter, Adobe Photoshop, Paint.NET, Microsoft Paint, Krita, and GIMP, revolve around editing pixels, unlike vector-based image editors, such as Xfig, CorelDRAW, Adobe Illustrator, or Inkscape, which revolve around editing lines and shapes (vectors). When an image is rendered in a raster-based image editor, the image is composed of millions of pixels. At its core, a raster image editor works by manipulating each individual pixel.[5] Most[13] pixel-based image editors work using the RGB color model, but some also allow the use of other color models, such as the CMYK color model.[14]

See also

[edit]

References

[edit]
Revisions and contributorsEdit on WikipediaRead on Wikipedia
from Grokipedia
Raster graphics, also known as images, are a type of composed of a rectangular grid of small, individually colored elements called , where each pixel represents a specific color and contributes to forming the overall picture. This pixel-based representation allows raster graphics to capture detailed visual information, such as photographs or scanned images, by dividing the image into a fixed of dots whose density determines the resolution. Raster graphics emerged in the 1970s alongside advances in , enabling the storage and display of data for raster displays through technologies like frame buffers. By the , affordable hardware made them standard in personal computing. In contrast to , which use mathematical paths to define scalable shapes, raster graphics are resolution-dependent and can become pixelated or blurry when enlarged, as they do not contain scalable object data but rather fixed information. This makes them ideal for complex, continuous-tone images like digital photographs, web images, and video frames, but less suitable for logos or illustrations requiring infinite without loss. Common file formats for raster graphics include for lossy compression of photographic content, for with transparency support, for simple animations and indexed colors, for high-quality printing, and BMP for uncompressed Windows bitmaps. Advantages of raster graphics include their ability to represent photorealistic details and compatibility with most software, such as , where resolution and scaling can be adjusted. However, their file sizes can be large without compression, and editing often requires recomputing values, leading to potential quality degradation in repeated manipulations. Today, raster graphics form the foundation of in applications ranging from to and gaming, underscoring their enduring role in visual media.

Fundamentals

Etymology and Definition

The term "raster" in the context of graphics originates from the German word Raster, meaning "screen" or "frame," which itself derives from the Latin rāstrum, denoting a "rake." This etymology evokes the systematic, line-by-line scanning pattern of early cathode-ray tube (CRT) displays, akin to the sweeping motion of a rake across a field. In computer graphics, the concept emerged in the 1960s, drawing from television scanning technology where images are built by sweeping an electron beam across a phosphor-coated screen to form horizontal lines of illuminated points. Engineers at Bell Laboratories, including A. Michael Noll, developed early raster-based systems in the mid-1960s, adapting CRT scanning for digital image display and manipulation, with the term "raster graphics" appearing in technical literature by 1971. Raster graphics refers to a dot matrix data structure that represents images as a rectangular grid of discrete picture elements, known as , where each pixel encodes specific values for color and intensity to form the overall visual content. This pixel-based approach fundamentally contrasts with , which define images through mathematical descriptions of paths, shapes, and fills rather than a fixed grid of dots.

Historical Development

The development of raster graphics traces its roots to the mid-20th century, influenced by advancements in cathode-ray tube (CRT) technology and military applications. In the 1950s, military radar displays began employing raster scanning techniques to visualize data in real-time, adapting television-style scan lines to present echo returns as pixel-like grids on screens, which laid foundational principles for grid-based image representation in . Early innovations included Douglas Engelbart's Picture System in 1963, which used raster scanning for on-screen image manipulation, and the first frame buffer developed by Randy Mott at Evans & Sutherland in 1968 for storing pixel data. The computer, developed at MIT starting in 1944 and operational by 1951, further advanced this by integrating CRT displays for real-time graphics simulation, enabling the first high-speed digital computer to handle interactive visual outputs for applications like , though its displays were primarily vector-based precursors to full raster s. By the late 1960s, true raster computer graphics emerged with A. Michael Noll's scanned display at , patented in 1970, which used frame buffers to store and refresh pixel data systematically. The 1970s marked the adoption of raster graphics in consumer and entertainment contexts, driven by affordable CRT technology. Atari's , released in 1972, utilized displays derived from television hardware to render simple geometric shapes and motion, popularizing real-time -based visuals in video games and demonstrating raster's suitability for dynamic content. Concurrently, Xerox PARC's Alto computer, introduced in 1973, pioneered bitmap displays—a core raster technique—featuring a 606 × 808 monochrome screen that supported bitmapped graphics for the first (GUI), influencing future personal computing designs. In the 1980s, raster graphics achieved standardization and widespread accessibility through personal computers. The Graphics Interchange Format (GIF), developed by and released in 1987, provided a compressed standard supporting up to 256 colors, facilitating the exchange of raster images over early networks and becoming a cornerstone for web and bulletin board graphics. Apple's Macintosh, launched in 1984, integrated raster displays into its GUI, using a 512 × 342 screen to enable intuitive icon-based interactions and raster editing via software like , which accelerated the shift from command-line to visual paradigms. The 1990s and 2000s saw raster graphics proliferate with and the , bolstered by compression standards and editing tools. The (JPEG) standard, finalized in 1992, introduced for photographic raster images, enabling efficient storage and transmission of high-fidelity color data, which revolutionized and web imaging. Photoshop's release in February 1990 further popularized raster editing by offering layered pixel manipulation on Macintosh systems, evolving into an industry-standard tool that democratized professional image processing for photographers and designers. From the onward, raster graphics integrated deeply with mobile devices and AI technologies. High-resolution standards like 4K and 8K became common in smartphones and tablets by the mid-2020s, while AI algorithms advanced raster processing through super-resolution upscaling and generative creation, maintaining raster's dominance in foundational as of November 2025.

Data Model

Pixel Grid and Sampling

Raster graphics represent images as a rectangular array of pixels organized in rows and columns, forming a structure known as a . Each pixel corresponds to a discrete sampling point on a two-dimensional grid, capturing intensity or color values from an underlying continuous scene. This grid-based model discretizes spatial , enabling efficient storage and manipulation in digital systems. The process of creating a raster image involves sampling, where continuous analog signals or real-world visuals are converted to digital form through spatial into the grid. This sampling must adhere to principles from to preserve fidelity; according to the Nyquist-Shannon sampling theorem, the sampling frequency must be at least twice the highest frequency in the signal to avoid artifacts, such as jagged edges or moiré patterns in the resulting image. In practice, for raster graphics, this implies selecting a resolution that adequately captures scene details without introducing reconstruction errors during display or processing. Pixels within the grid are addressed using integer coordinates (x,y)(x, y), where xx ranges from 0 to W1W-1 and yy from 0 to H1H-1, with WW denoting the grid width and HH the in pixels. Total pixels=W×H\text{Total pixels} = W \times H This formulation defines the 's spatial extent and data volume directly. In rendering pipelines, rasterization algorithms fill the grid by determining which pixels intersect geometric like points, lines, or polygons. These algorithms project vector-based descriptions onto the discrete grid, resolving visibility and coverage to produce the final ; for instance, scanline methods process the row by row to efficiently compute values from . This step is fundamental in real-time , transforming continuous into the sampled raster format. Raster images are stored as binary or indexed data structures, optimizing for the grid's uniformity. Monochrome rasters, representing binary images with on/off states, use 1 bit per for compact storage, such as in early formats where the entire grid fits into a bit-packed . Grayscale rasters extend this by assigning intensity levels to each , typically using 8 bits (256 shades) per to encode variations from to , allowing for smoother tonal representation without color. Formats like TIFF support both modes, storing the grid data in uncompressed or packed rows for direct access.

Color Representation and Depth

In raster graphics, color representation refers to the methods used to encode the color and intensity of each within the image data structure. The , measured in bits per pixel (bpp), determines the number of distinct colors or shades that can be represented, calculated as 2 raised to the power of the bit depth. For instance, a 1 bpp format supports images with two colors, typically black and white, suitable for simple binary representations. An 8 bpp image allows 256 levels of gray, providing a continuous range from black to white for applications requiring tonal variation without color. True color representation commonly uses 24 bpp, allocating 8 bits per channel in the RGB model to achieve approximately 16.7 million colors. The RGB color model is an additive color space widely used in raster graphics for display devices, where colors are formed by combining varying intensities of red, green, and blue light. Each channel typically ranges from 0 (minimum intensity) to 255 (maximum intensity) in 8-bit implementations. To normalize each channel value to a fractional intensity between 0 and 1, divide the 8-bit value by 255; for example, the normalized red intensity is r=R/255r = R / 255, where RR is the red channel value. This model starts from black (0,0,0) and adds light components to produce the desired hue. For printing applications, the serves as a subtractive alternative, using , , , and inks to absorb specific wavelengths from a white substrate, thereby creating colors through subtraction of light. Each channel is typically 8 bits, resulting in 32 bpp for full representation. palettes offer efficiency in raster graphics by mapping each to an index in a predefined table of up to 256 colors (8 bpp), reducing storage needs for images with limited color variety while maintaining visual through color quantization. Transparency in raster images is handled via an alpha channel, which specifies the opacity of each on a scale from 0 (fully transparent) to 255 (fully opaque) in 8-bit implementations. The RGBA model extends RGB by adding this channel, commonly at 32 bpp (8 bits per R, G, B, and A), enabling where semi-transparent pixels blend with underlying layers. (HDR) raster images surpass standard 8-bit limitations by employing floating-point representations, often 16 or 32 bits per channel, to capture a wider range of values from deep shadows to bright highlights without clipping. Formats like use 16-bit half-float per channel for efficient HDR storage in rendering pipelines. This extended depth preserves detail in scenes with high contrast ratios, essential for professional imaging and .

Image Properties

Resolution and Aspect Ratio

In raster graphics, resolution refers to the density of pixels within a given physical or display area, which directly influences sharpness and detail. For digital displays and screens, resolution is typically measured in pixels per inch (PPI), representing the number of pixels packed into one inch of the or screen surface. In contrast, for , resolution is expressed as (DPI), which quantifies the number of ink dots a printer can place per inch to reproduce the , often requiring higher values for comparable quality due to the physical nature of ink deposition. The effective resolution of a raster can be calculated as the pixel count divided by the physical size, where PPI (or DPI) = total pixels along a / in inches, ensuring the maintains clarity when mapped to a specific output medium. The sampling rate in raster graphics determines how finely the continuous scene is discretized into pixels, and insufficient rates can lead to —artifacts such as jagged edges or moiré patterns where high-frequency details are misrepresented. To mitigate , techniques are employed, including , which involves rendering the image at a higher resolution than the final output and then downsampling it to average values, thereby smoothing edges and reducing visual distortions. Aspect ratio defines the proportional relationship between the width and height of a , commonly expressed as a such as 16:9, which is standard for high-definition (HD) video and displays. Mismatching an 's during resizing can cause , stretching or compressing the content unevenly, which alters visual fidelity and may introduce unintended deformations in shapes or perspectives. Due to the fixed nature of pixel grids in raster graphics, scalability is limited; enlarging an image beyond its results in , where individual s become visibly blocky and details blur. For web display, images are sized by pixel dimensions, with PPI metadata typically set to 72 or 96 but ignored by browsers; to support high-DPI screens, higher pixel counts (e.g., 2x for displays) or responsive techniques like srcset are recommended. Print standards recommend 300 DPI to achieve smooth, high-quality output on paper. In modern and , resolution for camera sensors is often quantified in megapixels (MP), calculated as the total count divided by one million:
MP=width×height1,000,000\text{MP} = \frac{\text{width} \times \text{height}}{1,000,000}
This metric provides a concise measure of a sensor's capacity to capture detail, influencing applications from consumer snapshots to professional .

File Formats and Storage

Raster graphics are stored in various file formats designed to encapsulate data, headers, and optional metadata, enabling efficient storage, transmission, and rendering across devices. These formats differ in compression methods, support for features like transparency or multiple pages, and suitability for specific applications such as web display or professional . Common formats include BMP, , , , , , and , each balancing file size, quality preservation, and functionality. The (BMP) format, developed by , is an uncompressed raster image format featuring a simple structure with a file header followed directly by data. This header includes details like image dimensions, , and compression flags (typically none), making BMP straightforward for basic storage but resulting in large file sizes due to the lack of compression. BMP supports various bit depths from 1 to 32 bits per pixel and is commonly used in Windows environments for icons and simple graphics. JPEG, standardized by the (ISO) as ISO/IEC 10918, employs based on the (DCT) algorithm, optimized for photographic images with continuous tones. The format divides the image into 8x8 pixel blocks, applies DCT to reduce redundancy, and quantizes coefficients to achieve compression ratios often exceeding 10:1 while maintaining perceptual quality. JPEG files support (EXIF) metadata, which embeds camera settings, timestamps, and GPS data, enhancing usability in workflows. Portable Network Graphics (PNG), defined in the W3C Recommendation and ISO/IEC 15948, provides using the algorithm (a combination of LZ77 and ), preserving all original data without artifacts. PNG structures data into chunks for headers, image information, palette, and compressed streams, supporting alpha channels for transparency and interlacing for progressive loading. This makes it ideal for web graphics, logos, and diagrams where exact reproduction and partial transparency are required. Tagged Image File Format (TIFF), originally developed by and now maintained under Adobe's stewardship with Revision 6.0 as the baseline, offers high flexibility through a tag-based structure that accommodates multiple pages, resolutions, and compression options within a single file. TIFF uses Image File Directories (IFDs) to store metadata and supports like Lempel-Ziv-Welch (LZW), making it suitable for professional archiving, scanning, and printing where quality and extensibility are paramount. The Graphics Interchange Format (), developed by in 1987, uses lossless LZW compression and supports up to 256 indexed colors per frame, making it suitable for simple graphics, icons, and animations. GIF allows multiple frames for basic animations and transparency via a single , though it is limited for photographic images due to its color palette constraints. WebP, developed by and standardized by the W3C as of 2025, supports both lossy and with better efficiency than and , including animation and transparency support. It uses and VP8/VP9-derived algorithms, achieving smaller file sizes for web use while maintaining quality. AVIF (AV1 Image File Format), based on the AV1 video codec and standardized by the Alliance for Open Media, provides superior compression for both still images and sequences as of 2025. It supports high dynamic range (HDR), wide color gamut, and transparency, making it ideal for modern web and high-quality applications with file sizes significantly smaller than JPEG or PNG equivalents. Storage requirements for raster images depend on dimensions, bit depth, and compression. For uncompressed formats, the approximate file size in bytes is calculated as width×height×bpp8\frac{\text{width} \times \text{height} \times \text{bpp}}{8}, where bppbpp denotes bits per pixel; compression adjusts this downward, with lossy methods like JPEG yielding smaller files at the cost of some data fidelity. For example, a 1920x1080 image at 24 bpp uncompressed requires about 6.22 MB, but JPEG compression can reduce it to under 1 MB depending on quality settings. Metadata standards enhance raster file interoperability, particularly for . International Color Consortium (ICC) profiles, embedded as chunks or tags in formats like and , define color spaces and transformations to ensure consistent rendering across devices, preventing issues like color shifts in workflows from editing to output. in further supports this by including device-specific color information alongside other descriptive data.

Applications

Display and Rendering

Raster graphics are displayed on screens through a process known as raster scanning, where the image is refreshed line by line from top to bottom to maintain visual continuity and prevent flicker. In cathode ray tube (CRT) displays, an electron beam sweeps horizontally across the phosphor-coated screen, illuminating pixels sequentially at refresh rates typically ranging from 60 to 85 Hz, with some models supporting up to 200 Hz at reduced resolutions. Liquid crystal display (LCD) and organic light-emitting diode (OLED) panels, while not using an electron beam, employ a similar progressive raster scan by sequentially updating rows of pixels via matrix addressing, achieving refresh rates of 60 to 144 Hz or higher to ensure smooth motion rendering. This line-by-line refresh is essential for raster images, as it aligns with the pixel grid structure, allowing the display hardware to map color values directly to each pixel in real time. Modern rendering of raster graphics heavily relies on graphics processing units (GPUs) within the graphics pipeline, where rasterization converts vector primitives into a pixel-based fragment representation before applying textures. Texture mapping integrates raster images onto 3D surfaces by sampling pixel colors from the texture and interpolating them during the fragment shading stage, as defined in APIs like OpenGL and DirectX, which use programmable shaders to compute final pixel values efficiently. For instance, in OpenGL's fixed-function pipeline or DirectX's rasterizer stage, bilinear filtering samples neighboring texels to produce smooth transitions, enabling high-performance rendering of complex scenes with raster textures. This GPU-accelerated process handles the transformation from scene geometry to screen pixels, ensuring raster graphics are rendered at the display's native resolution with minimal latency. When raster images do not match the display's resolution, scaling and techniques adjust the grid to fit, preserving visual quality through mathematical resampling. computes new values by averaging the four nearest neighbors in a 2x2 grid, providing efficient smoothing for moderate resizing, while uses a 4x4 neighborhood for sharper results by considering cubic weighting functions, ideal for upscaling or downscaling high-detail images. These methods are commonly implemented in display drivers and software libraries to adapt raster content dynamically, avoiding artifacts like during real-time rendering. In web and mobile environments, responsive rendering of raster graphics uses and CSS to deliver optimized images across varying screen sizes and densities. The srcset attribute in the <img> tag specifies multiple raster image sources with different resolutions, allowing browsers to select the most appropriate version based on the device's and ratio, while the sizes attribute guides expected display sizes for efficient loading. This approach, combined with CSS properties like object-fit for scaling, ensures raster images render crisply on diverse devices without excessive bandwidth use or quality loss. High-resolution displays demand correspondingly detailed raster graphics to fully utilize their , with 4K Ultra HD (UHD) defined as 3840×2160 pixels, providing approximately four times the detail of Full HD for immersive viewing. On devices like iPhones, Retina scaling renders user interfaces and images at double or higher the logical resolution—such as 2x or 3x —before downsampling to the physical screen, achieving sub-pixel sharpness equivalent to 300+ pixels per inch without apparent jagged edges. Similarly, 8K displays at 7680×4320 pixels extend this capability, requiring raster sources with millions of pixels to avoid artifacts and maximize clarity in professional and consumer applications.

Printing and Physical Output

Raster images, typically defined in terms of pixels per inch (PPI), must be adapted to the dots per inch (DPI) capabilities of printing devices for physical output. Inkjet printers commonly achieve resolutions between 300 and 720 DPI, while laser printers range from 600 to 2400 DPI, allowing for finer detail than many screen displays but requiring adjustments to match the raster's PPI. To reproduce continuous tones and colors on printers limited to discrete ink dots, halftoning techniques are employed, particularly error diffusion algorithms that simulate grayscale or color gradations. The Floyd-Steinberg algorithm, introduced in 1976, exemplifies this by quantizing pixel values and distributing the resulting error to adjacent unprocessed pixels according to a weighted matrix, reducing visible artifacts and enhancing perceived quality in printed images. A key component in this process is the (RIP), specialized software that interprets raster data, applies halftoning, and generates device-specific instructions for the printer, ensuring accurate rendering of resolution, screening, and color separation. Since most raster images are created in for digital viewing, color management during printing involves converting to CMYK, the subtractive model used by printers, often requiring gamut mapping to compress out-of-gamut RGB colors into the narrower CMYK range while preserving visual intent through perceptual or relative colorimetric rendering. For large-format applications like billboards, high-resolution raster images are scaled and tiled across panels, typically requiring an effective 100 to 150 DPI at viewing distances of tens of meters to maintain clarity without excessive file sizes; for instance, a 100-meter-wide billboard might use rasters optimized to 150 DPI overall.

Compression Techniques

Raster graphics compression techniques aim to reduce file sizes while preserving essential image information, enabling efficient storage and transmission. These methods exploit redundancies in pixel data, such as spatial correlations or perceptual similarities, and are broadly categorized into lossless and lossy approaches. Lossless compression ensures exact reconstruction of the original image, making it suitable for applications requiring fidelity, like medical imaging or archival. In contrast, lossy compression discards less perceptible details to achieve higher ratios, prioritizing visual quality over pixel-perfect accuracy. Lossless techniques include (RLE), which replaces sequences of identical pixels with a single value and count, proving effective for simple raster images with large uniform areas, such as icons or . Formats like employ , combining LZ77 dictionary-based prediction with for entropy reduction, achieving reversible compression across various image types. Similarly, uses LZW compression, a variant of dictionary coding, to handle limited-color palettes without data loss. , assigning shorter variable-length codes to frequent pixel values or symbols, further enhances efficiency in formats like TIFF, where it supports both standalone and combined use with other methods. Lossy compression, exemplified by JPEG, transforms pixel blocks into frequency domains for selective discard of high-frequency components imperceptible to the human eye. JPEG divides images into 8×8 pixel blocks and applies the two-dimensional discrete cosine transform (DCT) to obtain a coefficient matrix, concentrating energy in low-frequency terms. The DCT formula for an N×N block (N=8) is: Fu,v=2NCuCvx=0N1y=0N1fx,ycos[π(2x+1)u2N]cos[π(2y+1)v2N]F_{u,v} = \frac{2}{N} C_u C_v \sum_{x=0}^{N-1} \sum_{y=0}^{N-1} f_{x,y} \cos\left[ \frac{\pi (2x + 1) u}{2N} \right] \cos\left[ \frac{\pi (2y + 1) v}{2N} \right] where Ck=12C_k = \frac{1}{\sqrt{2}}
Add your contribution
Related Hubs
Contribute something
User Avatar
No comments yet.