Powered by NetworkEleven ImageMagick logo


NAME

resource - Limit Resource Consumption


SYNOPSIS

unsigned int AcquireMagickResource( const ResourceType type, const ExtendedSignedIntegralType size );

int AcquireUniqueFileResource( char *path );

unsigned long GetMagickResource( const ResourceType type );

void LiberateMagickResource( const ResourceType type, const ExtendedSignedIntegralType size );

unsigned int( void ) LiberateUniqueFileResource( char *name );

unsigned int ListMagickResourceInfo( FILE *file, ExceptionInfo *exception );

void SetMagickResourceLimit( const ResourceType type, const unsigned long limit );


FUNCTION DESCRIPTIONS

AcquireMagickResource

AcquireMagickResource() acquires resources of the specified type. True is returned if the specified resource is available otherwise False.
The format of the AcquireMagickResource() method is:
unsigned int AcquireMagickResource ( const ResourceType type, const ExtendedSignedIntegralType size );

A description of each parameter follows:

type:
The type of resource.

size:
The number of bytes needed from for this resource.

AcquireUniqueFileResource

AcquireUniqueFileResource() returns a unique file name, and returns a file descriptor for the file open for reading and writing.
The format of the AcquireUniqueFileResource() method is:
int AcquireUniqueFileResource ( char *path );

A description of each parameter follows:

path:
Specifies a pointer to an array of characters. The unique path name is returned in this array.

GetMagickResource

GetMagickResource() returns the the specified resource in megabytes.
The format of the GetMagickResource() method is:
unsigned long GetMagickResource ( const ResourceType type );

A description of each parameter follows:

type:
The type of resource.

LiberateMagickResource

LiberateMagickResource() liberates resources of the specified type.
The format of the LiberateMagickResource() method is:
void LiberateMagickResource ( const ResourceType type, const ExtendedSignedIntegralType size );

A description of each parameter follows:

type:
The type of resource.

size:
The size of the resource.

LiberateUniqueFileResource

( void ) LiberateUniqueFileResource() deletes a unique file resource.
The format of the ( void ) LiberateUniqueFileResource() method is:
unsigned int ( void ) LiberateUniqueFileResource ( char *name );

A description of each parameter follows:

name:
the name of the temporary resource.

ListMagickResourceInfo

Method ListMagickResourceInfo lists the resource info to a file.

The format of the ListMagickResourceInfo method is:

unsigned int ListMagickResourceInfo ( FILE *file, ExceptionInfo *exception );

A description of each parameter follows.

file:
An pointer to a FILE.

exception:
Return any errors or warnings in this structure.

SetMagickResourceLimit

SetMagickResourceLimit() sets the limit for a particular resource in megabytes.
The format of the SetMagickResourceLimit() method is:
void SetMagickResourceLimit ( const ResourceType type, const unsigned long limit );

A description of each parameter follows:

type:
The type of resource.

limit:
The maximum limit for the resource.

Top of page
"Image manipulation software that works like magick"