GraphicsMagick

- Home
- Project
- Download
- Install
- Source
- News
- Utilities
- Programming
- Reference

# export

Export image pixels into common representations

Contents

- ExportImagePixelArea

- ExportViewPixelArea

- ExportPixelAreaOptionsInit

# ExportImagePixelArea

## Synopsis

    MagickPassFail ExportImagePixelArea( const Image *image, const QuantumType quantum_type,
                                         unsigned int quantum_size, unsigned char *destination,
                                         const ExportPixelAreaOptions *options,
                                         ExportPixelAreaInfo *export_info );

## Description

ExportImagePixelArea() transfers one or more pixel components from the default image pixel cache view to a user supplied buffer. By default, values are written in network (big-endian) byte/bit order. By setting the 'endian' member of ExportPixelAreaOptions, 16, 32 and 64-bit values may be output as little (LSBEndian), big (MSBEndian), or host native (NativeEndian) endian values. This function is quite powerful in that besides common native CPU type sizes, it can support any integer bit depth from 1 to 32 (e.g. 13), 64-bits as well as 32 and 64-bit float.

MagickPass is returned if the pixels are successfully transferred, otherwise MagickFail.

The format of the ExportImagePixelArea method is:

    MagickPassFail ExportImagePixelArea( const Image *image, const QuantumType quantum_type,
                                         unsigned int quantum_size, unsigned char *destination,
                                         const ExportPixelAreaOptions *options,
                                         ExportPixelAreaInfo *export_info );

status:

  Returns MagickPass if the pixels are successfully transferred, otherwise MagickFail.

image:

  The image.

quantum_type:

  Declare which pixel components to transfer (AlphaQuantum, BlackQuantum, BlueQuantum, CMYKAQuantum, CMYKQuantum, CyanQuantum, GrayAlphaQuantum, GrayQuantum, GreenQuantum, IndexAlphaQuantum, IndexQuantum, MagentaQuantum, RGBAQuantum, RGBQuantum, RedQuantum, YellowQuantum)

quantum_size:

  Bits per quantum sample (range 1-32, and 64).

destination:

  The components are transferred to this buffer. The user is responsible for ensuring that the destination buffer is large enough.

options:

  Additional options specific to quantum_type (may be NULL).

export_info :

  Populated with information regarding the pixels exported (may be NULL)

# ExportViewPixelArea

## Synopsis

    MagickPassFail ExportViewPixelArea( const ViewInfo *view, const QuantumType quantum_type,
                                        unsigned int quantum_size, unsigned char *destination,
                                        const ExportPixelAreaOptions *options,
                                        ExportPixelAreaInfo *export_info );

## Description

ExportViewPixelArea() transfers one or more pixel components from the specified image pixel cache view to a user supplied buffer. By default, values are written in network (big-endian) byte/bit order. By setting the 'endian' member of ExportPixelAreaOptions, 16, 32 and 64-bit values may be output as little (LSBEndian), big (MSBEndian), or host native (NativeEndian) endian values. This function is quite powerful in that besides common native CPU type sizes, it can support any integer bit depth from 1 to 32 (e.g. 13), 64-bits as well as 32 and 64-bit float.

MagickPass is returned if the pixels are successfully transferred, otherwise MagickFail.

The format of the ExportViewPixelArea method is:

    MagickPassFail ExportViewPixelArea( const ViewInfo *view, const QuantumType quantum_type,
                                        unsigned int quantum_size, unsigned char *destination,
                                        const ExportPixelAreaOptions *options,
                                        ExportPixelAreaInfo *export_info );

status:

  Returns MagickPass if the pixels are successfully transferred, otherwise MagickFail.

view:

  The image pixel cache view.

quantum_type:

  Declare which pixel components to transfer (AlphaQuantum, BlackQuantum, BlueQuantum, CMYKAQuantum, CMYKQuantum, CyanQuantum, GrayAlphaQuantum, GrayQuantum, GreenQuantum, IndexAlphaQuantum, IndexQuantum, MagentaQuantum, RGBAQuantum, RGBQuantum, RedQuantum, YellowQuantum)

quantum_size:

  Bits per quantum sample (range 1-32, and 64).

destination:

  The components are transferred to this buffer. The user is responsible for ensuring that the destination buffer is large enough.

options:

  Additional options specific to quantum_type (may be NULL).

export_info :

  Populated with information regarding the pixels exported (may be NULL)

# ExportPixelAreaOptionsInit

## Synopsis

    void ExportPixelAreaOptionsInit( ExportPixelAreaOptions *options );

## Description

ExportPixelAreaOptionsInit() initializes the options structure which is optionally passed to ExportPixelArea()

The format of the ExportPixelAreaOptionsInit method is:

    void ExportPixelAreaOptionsInit( ExportPixelAreaOptions *options );

A description of each parameter follows:

options:

  Options structure to initialize.

Copyright © GraphicsMagick Group 2002 - 2024