Unix
Mac OS X
iPhone
Windows
Processing
Options
Usage
MagickWand
MagickCore
PerlMagick
Magick++
Unix
Windows
Links

# Module image-view Methods

## CloneImageView

CloneImageView() makes a copy of the specified image view.

The format of the CloneImageView method is:

      ImageView *CloneImageView(const ImageView *image_view)

A description of each parameter follows:

##### image_view

the image view.

## DestroyImageView

DestroyImageView() deallocates memory associated with a image view.

The format of the DestroyImageView method is:

      ImageView *DestroyImageView(ImageView *image_view)

A description of each parameter follows:

##### image_view

the image view.

## DuplexTransferImageViewIterator

DuplexTransferImageViewIterator() iterates over three image views in parallel and calls your transfer method for each scanline of the view. The source and duplex pixel extent is not confined to the image canvas-- that is you can include negative offsets or widths or heights that exceed the image dimension. However, the destination image view is confined to the image canvas-- that is no negative offsets or widths or heights that exceed the image dimension are permitted.

The callback signature is:

      MagickBooleanType DuplexTransferImageViewMethod(const ImageView *source,
        const ImageView *duplex,ImageView *destination,const ssize_t y,
        const int thread_id,void *context)

Use this pragma if the view is not single threaded:

          #pragma omp critical

to define a section of code in your callback transfer method that must be executed by a single thread at a time.

The format of the DuplexTransferImageViewIterator method is:

      MagickBooleanType DuplexTransferImageViewIterator(ImageView *source,
        ImageView *duplex,ImageView *destination,
        DuplexTransferImageViewMethod transfer,void *context)

A description of each parameter follows:

##### source

the source image view.

##### duplex

the duplex image view.

##### destination

the destination image view.

##### transfer

the transfer callback method.

##### context

the user defined context.

## GetImageViewAuthenticIndexes

GetImageViewAuthenticIndexes() returns the image view authentic indexes.

The format of the GetImageViewAuthenticPixels method is:

      IndexPacket *GetImageViewAuthenticIndexes(const ImageView *image_view)

A description of each parameter follows:

##### image_view

the image view.

## GetImageViewAuthenticPixels

GetImageViewAuthenticPixels() returns the image view authentic pixels.

The format of the GetImageViewAuthenticPixels method is:

      PixelPacket *GetImageViewAuthenticPixels(const ImageView *image_view)

A description of each parameter follows:

##### image_view

the image view.

## GetImageViewException

GetImageViewException() returns the severity, reason, and description of any error that occurs when utilizing a image view.

The format of the GetImageViewException method is:

      char *GetImageViewException(const PixelImage *image_view,
        ExceptionType *severity)

A description of each parameter follows:

##### image_view

the pixel image_view.

##### severity

the severity of the error is returned here.

## GetImageViewExtent

GetImageViewExtent() returns the image view extent.

The format of the GetImageViewExtent method is:

      RectangleInfo GetImageViewExtent(const ImageView *image_view)

A description of each parameter follows:

##### image_view

the image view.

## GetImageViewImage

GetImageViewImage() returns the image associated with the image view.

The format of the GetImageViewImage method is:

      MagickCore *GetImageViewImage(const ImageView *image_view)

A description of each parameter follows:

##### image_view

the image view.

## GetImageViewIterator

GetImageViewIterator() iterates over the image view in parallel and calls your get method for each scanline of the view. The pixel extent is not confined to the image canvas-- that is you can include negative offsets or widths or heights that exceed the image dimension. Any updates to the pixels in your callback are ignored.

The callback signature is:

      MagickBooleanType GetImageViewMethod(const ImageView *source,
        const ssize_t y,const int thread_id,void *context)

Use this pragma if the view is not single threaded:

          #pragma omp critical

to define a section of code in your callback get method that must be executed by a single thread at a time.

The format of the GetImageViewIterator method is:

      MagickBooleanType GetImageViewIterator(ImageView *source,
        GetImageViewMethod get,void *context)

A description of each parameter follows:

##### source

the source image view.

##### get

the get callback method.

##### context

the user defined context.

## GetImageViewVirtualIndexes

GetImageViewVirtualIndexes() returns the image view virtual indexes.

The format of the GetImageViewVirtualIndexes method is:

      const IndexPacket *GetImageViewVirtualIndexes(
        const ImageView *image_view)

A description of each parameter follows:

##### image_view

the image view.

## GetImageViewVirtualPixels

GetImageViewVirtualPixels() returns the image view virtual pixels.

The format of the GetImageViewVirtualPixels method is:

      const PixelPacket *GetImageViewVirtualPixels(const ImageView *image_view)

A description of each parameter follows:

##### image_view

the image view.

## IsImageView

IsImageView() returns MagickTrue if the the parameter is verified as a image view object.

The format of the IsImageView method is:

      MagickBooleanType IsImageView(const ImageView *image_view)

A description of each parameter follows:

##### image_view

the image view.

## NewImageView

NewImageView() returns a image view required for all other methods in the Image View API.

The format of the NewImageView method is:

      ImageView *NewImageView(MagickCore *wand)

A description of each parameter follows:

##### wand

the wand.

## NewImageViewRegion

NewImageViewRegion() returns a image view required for all other methods in the Image View API.

The format of the NewImageViewRegion method is:

      ImageView *NewImageViewRegion(MagickCore *wand,const ssize_t x,
        const ssize_t y,const size_t width,const size_t height)

A description of each parameter follows:

##### wand

the magick wand.

##### x,y,columns,rows

These values define the perimeter of a extent of pixel_wands view.

## SetImageViewDescription

SetImageViewDescription() associates a description with an image view.

The format of the SetImageViewDescription method is:

      void SetImageViewDescription(ImageView *image_view,
        const char *description)

A description of each parameter follows:

##### image_view

the image view.

##### description

the image view description.

## SetImageViewIterator

SetImageViewIterator() iterates over the image view in parallel and calls your set method for each scanline of the view. The pixel extent is confined to the image canvas-- that is no negative offsets or widths or heights that exceed the image dimension. The pixels are initiallly undefined and any settings you make in the callback method are automagically synced back to your image.

The callback signature is:

      MagickBooleanType SetImageViewMethod(ImageView *destination,
        const ssize_t y,const int thread_id,void *context)

Use this pragma if the view is not single threaded:

          #pragma omp critical

to define a section of code in your callback set method that must be executed by a single thread at a time.

The format of the SetImageViewIterator method is:

      MagickBooleanType SetImageViewIterator(ImageView *destination,
        SetImageViewMethod set,void *context)

A description of each parameter follows:

##### destination

the image view.

##### set

the set callback method.

##### context

the user defined context.

## SetImageViewThreads

SetImageViewThreads() sets the number of threads in a thread team.

The format of the SetImageViewDescription method is:

      void SetImageViewThreads(ImageView *image_view,
        const size_t number_threads)

A description of each parameter follows:

##### image_view

the image view.

##### number_threads

the number of threads in a thread team.

## TransferImageViewIterator

TransferImageViewIterator() iterates over two image views in parallel and calls your transfer method for each scanline of the view. The source pixel extent is not confined to the image canvas-- that is you can include negative offsets or widths or heights that exceed the image dimension. However, the destination image view is confined to the image canvas-- that is no negative offsets or widths or heights that exceed the image dimension are permitted.

The callback signature is:

      MagickBooleanType TransferImageViewMethod(const ImageView *source,
        ImageView *destination,const ssize_t y,const int thread_id,
        void *context)

Use this pragma if the view is not single threaded:

          #pragma omp critical

to define a section of code in your callback transfer method that must be executed by a single thread at a time.

The format of the TransferImageViewIterator method is:

      MagickBooleanType TransferImageViewIterator(ImageView *source,
        ImageView *destination,TransferImageViewMethod transfer,void *context)

A description of each parameter follows:

##### source

the source image view.

##### destination

the destination image view.

##### transfer

the transfer callback method.

##### context

the user defined context.

## UpdateImageViewIterator

UpdateImageViewIterator() iterates over the image view in parallel and calls your update method for each scanline of the view. The pixel extent is confined to the image canvas-- that is no negative offsets or widths or heights that exceed the image dimension are permitted. Updates to pixels in your callback are automagically synced back to the image.

The callback signature is:

      MagickBooleanType UpdateImageViewMethod(ImageView *source,
        const ssize_t y,const int thread_id,void *context)

Use this pragma if the view is not single threaded:

          #pragma omp critical

to define a section of code in your callback update method that must be executed by a single thread at a time.

The format of the UpdateImageViewIterator method is:

      MagickBooleanType UpdateImageViewIterator(ImageView *source,
        UpdateImageViewMethod update,void *context)

A description of each parameter follows:

##### source

the source image view.

##### update

the update callback method.

##### context

the user defined context.

Discourse Server • Studio