Graphisoft®

GX ModuleVersion: 16

GXImageCreateFromGSPixMap

Create a CGImage from part of a given GSPixMap.

    CGImageRef GXImageCreateFromGSPixMap (
      GSPixMapHandle        source,
      GSRect*               srcRect,
      GXImageOwneship       pixMapOwnership,
      Int32                 depth
    );

Parameters

source
The source GSPixMap.
srcRect
Rectangle that determines a part of the source pixmap that is used to create the CGImage.
pixMapOwnership
If this value is GXImageCopyData, then the image data is copied; if it is GXImageTakeOwnership, then the user takes ownership of the whole GXImage.
depth
If depth = 0, then ignore the depth value (use the source's),
if 1 then create a 1-bit deep gray image,
if 8 then create an 8-bit gray image,
if 24 then create a 24-bit color image,
if 32 then create a color image with alpha.

Return Values

If the function succeeds, the return value is the created CGImage. The caller must call CGImageRelease to it when it is no longer used. If the function fails, the return value is NULL.

Remarks

This function acessible only on Macintosh.

Requirements

Version:
GX 10 or later
Header:
Graphics2DMac.h
Import Library:
GXImp.lib
Module:
GX.framework [MAC]

See Also

Mac-specific functions