Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ XCreImage(3X) — AOS 4.3

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

XPutImage(3X)

XCreateImage(3X)  —  X Version 11

NAME

XCreateImage, XGetPixel, XPutPixel, XSubImage, XAddPixel, XDestroyImage − image utilities

SYNTAX

XImage ∗XCreateImage(display, visual, depth, format, offset, data, width, height, bitmap_pad,
                        bytes_per_line)
      Display ∗display;
      Visual ∗visual;
      unsigned int depth;
      int format;
      int offset;
      char ∗data;
      unsigned int width;
      unsigned int height;
      int bitmap_pad;
      int bytes_per_line;

unsigned long XGetPixel(ximage, x, y)
      XImage ∗ximage;
      int x;
      int y;

int XPutPixel(ximage, x, y, pixel)
      XImage ∗ximage;
      int x;
      int y;
      unsigned long pixel;

XImage ∗XSubImage(ximage, x, y, subimage_width, subimage_height)
      XImage ∗ximage;
      int x;
      int y;
      unsigned int subimage_width;
      unsigned int subimage_height;

int XAddPixel(ximage, value)
      XImage ∗ximage;
      int value;

int XDestroyImage(ximage)
        XImage ∗ximage;

ARGUMENTS

bytes_per_line
Specifies the number of bytes in the client image between the start of one scanline and the start of the next. If you pass a zero value, Xlib assumes that the scanlines are contiguous in memory and calculates the value of bytes_per_line itself.

dataSpecifies a pointer to the image data. 

depthSpecifies the depth of the image. 

displaySpecifies the connection to the X server. 

formatSpecifies the format for the image.  You can pass one of these constants: XYPixmap or ZPixmap.

heightSpecifies the height (in pixels) of the image. 

offsetSpecifies the number of pixels to ignore at the beginning of the scanline.  This permits the rapid displaying of the image without requiring each scanline to be shifted into position. 
 

pixelSpecifies the new pixel value. 

subimage_height
Specifies the height (in pixel) of the new subimage.

subimage_width
Specifies the width (in pixels) of the new subimage.

valueSpecifies the constant value that is to be added. 

visualSpecifies a pointer to the visual. 

widthSpecifies the width (in pixels) of the image. 

ximageSpecifies a pointer to the image. 

bitmap_padSpecifies the quantum of a scanline.  In other words, the start of one scanline is separated in client memory from the start of the next scanline by an integer multiple of this many bits.  You must pass one of these values: 8, 16, or 32. 

x

ySpecify the x and y coordinates. 

DESCRIPTION

The XCreateImage function allocates the memory needed for an XImage structure for the specified display.

The XGetPixel function returns the specified pixel from the named image.

The XPutPixel function overwrites the pixel in the named image with the specified pixel value.

The XSubImage function creates a new image that is a subsection of an existing one.

The XAddPixel function adds a constant value to every pixel in an image.

The XDestroyImage function deallocates the memory associated with the XImage structure.

SEE ALSO

XPutImage(3X)
Xlib − C Language X Interface

1 March 1988

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026