>mac - Macintosh Utility Methods for ImageMagick;/


NAME



/mac - Macintosh Utility Methods for ImageMagick




(

SYNOPSIS



@BottleneckTest(picture,codec,depth,colormap_id)

Exit(status)

2FilenameToFSSpec(filename,fsspec)

*MACSystemCommand(command)

0image=ReadPICTImage(image_info)

@SetApplicationType(filename,magick,application)

closedir(entry)

opendir(entry)

readdir(entry)

(seekdir(entry,position)

telldir(entry)




B

FUNCTION DESCRIPTIONS






4

BottleneckTest



7Method BottleneckTest intercepts any compressed images.

,The format of the BottleneckTest routine is:

<

        BottleneckTest(picture,codec,depth,colormap_id)


(A description of each parameter follows:

6
picture:


-Specifies a pointer to a PicHandle structure.

codec:


>The code type is returned in this CodecType pointer structure.

depth:


2The image depth is returned as an integer pointer.%

colormap_id:


2The colormap ID is returned in this short pointer.






(

closedir



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

&The format of the closedir routine 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 routine is:



        Exit(status)


(A description of each parameter follows:

status:


Dan integer value representing the status of the terminating process.






8

FilenameToFSSpec



7Method FilenameToFSSpec sets the file type of an image.

.The format of the FilenameToFSSpec routine is:

.

        FilenameToFSSpec(filename,fsspec)


(A description of each parameter follows:

"
filename:


Specifies the name of the file.

fsspec:


A pointer to type FSSpec.






>

MacGSExecuteCommand



<Method MacGSExecuteCommand executes the Ghostscript command.




L

MacGSLaunchApplicationCore



CMethod MacGSLaunchApplicationCore launches the Ghostscript command.




D

MacGSLaunchApplication



?Method MacGSLaunchApplication launches the Ghostscript command.




R

MacGSLaunchApplicationToFront



HMethod MacGSLaunchApplicationToFront moves the Ghostscript window to thefront.




@

MacGSQuitApplication



>Method MacGSQuitApplication quits the Ghostscript application.




B

MacGSSetWorkingFolder



@Method MacGSSetWorkingFolder set the Ghostscript working folder.




8

MACSystemCommand



O

 Method MACSystemCommand executes the specified command and waits until it


H

 terminates.  The returned value is the exit status of the command.


.The format of the MACSystemCommand routine is:

&

        MACSystemCommand(command)


(A description of each parameter follows:

!
command:


&This string is the command to execute.






:

MACWarningHandler



4Method MACWarningHandler displays a warning message.

/The format of the MACWarningHandler routine is:




&

opendir



EMethod opendir opens the directory named by filename and associates adirectory stream with it.

%The format of the opendir routine is:



        opendir(entry)


(A description of each parameter follows:


entry:


'Specifies a pointer to a DIR structure.






B

ProcessPendingEventsi



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

2The format of the ProcessPendingEvents routine is:

#

    ProcessPendingEvents(text)


(A description of each parameter follows:


text:


4A character string representing the current process.






&

readdir



JMethod readdir returns a pointer to a structure representing the directoryDentry at the current position in the directory stream to which entryrefers.

The format of the readdir



        readdir(entry)


(A description of each parameter follows:


entry:


'Specifies a pointer to a DIR structure.






2

ReadPICTImage



GMethod ReadPICTImage reads an Apple Macintosh QuickDraw/PICT image fileFusing MacOS QuickDraw routines and returns it. It allocates the memoryFnecessary for the new Image structure and returns a pointer to the newimage.

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

+The format of the ReadPICTImage routine is:

,

        image=ReadPICTImage(image_info)


(A description of each parameter follows:


image:


IMethod ReadPICTImage returns a pointer to the image after reading. A nullKimage is returned if there is a a memory shortage or if the image cannot beread.$

image_info:


.Specifies a pointer to an ImageInfo structure.






2

SearchForFile



)Method SearchForFile searches for a file.




&

seekdir



CMethod seekdir sets the position of the next readdir()"operation on the directory stream.

%The format of the seekdir routine 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



9Method SetApplicationType sets the file type of an image.

0The format of the SetApplicationType routine 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



G

 Method telldir returns the current location associated  with  the




 named directory stream.


%The format of the telldir routine is:



        telldir(entry)


(A description of each parameter follows:


entry:


'Specifies a pointer to a DIR structure.