- NAME
- SYNOPSIS
- FUNCTION DESCRIPTIONS
  - BottleneckTest
  - closedir
  - Exit
  - FilenameToFSSpec
  - ImageFormatConflict
  - MacGSExecuteCommand
  - MacGSLaunchApplicationCore
  - MacGSLaunchApplication
  - MacGSLaunchApplicationToFront
  - MacGSQuitApplication
  - MacGSSetWorkingFolder
  - MACSystemCommand
  - MACWarningHandler
  - opendir
  - ProcessPendingEvents
  - readdir
  - ReadPICTImage
  - SearchForFile
  - seekdir
  - SetApplicationType
  - telldir

# NAME

mac - Macintosh Utility Methods for ImageMagick

# SYNOPSIS

     B<Exit>(status)

     B<FilenameToFSSpec>(filename,fsspec)

status= ImageFormatConflict(magick)

     B<ProcessPendingEvents>(text)

     B<SetApplicationType>(filename,magick,application)

     B<closedir>(entry)

     B<readdir>(entry)

     B<seekdir>(entry,position)

     B<telldir>(entry)

# FUNCTION DESCRIPTIONS

## BottleneckTest

Method BottleneckTest intercepts any compressed images.

The format of the BottleneckTest method is:

        int ImageFormatConflict(const char *magick)

A description of each parameter follows:

picture:

  Specifies a pointer to a PicHandle structure.

codec:

  The code type is returned in this CodecType pointer structure.

depth:

  The image depth is returned as an integer pointer.

colormap_id:

  The colormap ID is returned in this short pointer.

## closedir

Method closedir closes the named directory stream and frees the DIR structure.

The format of the closedir method is:

            closedir(entry)

A description of each parameter follows:

entry:

  Specifies a pointer to a DIR structure.

## Exit

Method Exit exits the process.

The format of the Exit method is:

            Exit(status)

A description of each parameter follows:

status:

  an integer value representing the status of the terminating process.

## FilenameToFSSpec

Method FilenameToFSSpec sets the file type of an image.

The format of the FilenameToFSSpec method is:

            FilenameToFSSpec(filename,fsspec)

A description of each parameter follows:

filename:

  Specifies the name of the file.

fsspec:

  A pointer to type FSSpec.

## ImageFormatConflict

Method ImageFormatConflict returns true if the image format conflicts with a logical drive (.e.g. X:).

Contributed by Mark Gavin of Digital Applications, Inc.

The format of the ImageFormatConflict method is:

            status=ImageFormatConflict(magick)

A description of each parameter follows:

status:

  Method ImageFormatConflict returns true if the image format conflicts with a logical drive.

magick:

  Specifies the image format.

## MacGSExecuteCommand

Method MacGSExecuteCommand executes the Ghostscript command.

## MacGSLaunchApplicationCore

Method MacGSLaunchApplicationCore launches the Ghostscript command.

## MacGSLaunchApplication

Method MacGSLaunchApplication launches the Ghostscript command.

## MacGSLaunchApplicationToFront

Method MacGSLaunchApplicationToFront moves the Ghostscript window to the front.

## MacGSQuitApplication

Method MacGSQuitApplication quits the Ghostscript application.

## MacGSSetWorkingFolder

Method MacGSSetWorkingFolder set the Ghostscript working folder.

## MACSystemCommand

     Method MACSystemCommand executes the specified command and waits until it
     terminates.  The returned value is the exit status of the command.

The format of the MACSystemCommand method is:

        void MACWarningHandler(const unsigned int warning,const char *message,
          const char *qualifier)

A description of each parameter follows:

command:

  This string is the command to execute.

## MACWarningHandler

Method MACWarningHandler displays a warning message.

The format of the MACWarningHandler method is:

## opendir

Method opendir opens the directory named by filename and associates a directory stream with it.

The format of the opendir method is:

        void ProcessPendingEvents(const char *text)

A description of each parameter follows:

entry:

  Specifies a pointer to a DIR structure.

## ProcessPendingEvents

Method ProcessPendingEvents processes any pending events. This prevents ImageMagick from monopolizing the processor.

The format of the ProcessPendingEvents method is:

            ProcessPendingEvents(text)

A description of each parameter follows:

text:

  A character string representing the current process.

## readdir

Method readdir returns a pointer to a structure representing the directory entry at the current position in the directory stream to which entry refers.

The format of the readdir

            readdir(entry)

A description of each parameter follows:

entry:

  Specifies a pointer to a DIR structure.

## ReadPICTImage

Method ReadPICTImage reads an Apple Macintosh QuickDraw/PICT image file using MacOS QuickDraw methods and returns it. It allocates the memory necessary for the new Image structure and returns a pointer to the new image.

This method was written and contributed by spd@daphne.cps.unizar.es (feel free to copy and use it as you want. No warranty).

The format of the ReadPICTImage method is:

        void ProcessPendingEvents(const char *text)

A description of each parameter follows:

image:

  Method ReadPICTImage returns a pointer to the image after reading. A null image is returned if there is a a memory shortage or if the image cannot be read.

image_info:

  Specifies a pointer to an ImageInfo structure.

## SearchForFile

Method SearchForFile searches for a file.

## seekdir

Method seekdir sets the position of the next `readdir()` operation on the directory stream.

The format of the seekdir method is:

            seekdir(entry,position)

A description of each parameter follows:

entry:

  Specifies a pointer to a DIR structure.

position:

  specifies the position associated with the directory stream.

## SetApplicationType

Method SetApplicationType sets the file type of an image.

The format of the SetApplicationType method is:

            SetApplicationType(filename,magick,application)

A description of each parameter follows:

filename:

  Specifies the name of the file.

filename:

  Specifies the file type.

application:

  Specifies the type of the application.

## telldir

     Method telldir returns the current location associated  with  the
     named directory stream.

The format of the telldir method is:

            telldir(entry)

A description of each parameter follows:

entry:

  Specifies a pointer to a DIR structure.