QMed_ExportImage

QMed_ExportImage(imageRef; targetPath; targetType):error
imageRef Longint Reference to the image
targetPath Text Pathname to the target file
targetType String4 4-char image type identifier
error Longint Error result

Saves a copy of an image in a specific file format. If the image has multiple frames the command applies to the currently selected frame.

The image is specified by imageRef. If imageRef is not a valid image, error qmed_paramErr is returned.

The target (destination) file is specified by targetPath. The target file may not already exist, but its containing folder path must be valid. If targetPath points to an existing file, the latter will be replaced by the new file. If targetPath is empty, a file selection dialog is presented.

The targetType parameter specifies the target file format. If targetPath is specified and targetType is passed an empty string, targetType defaults to "PICT". If targetPath is not specified, both the target path and type will have to be selected from the file selection dialog. In any other case qmed_ParamErr error will be generated. If the user cancels the dialog, error qmed_userCancelErr is returned.

To get the list of avaliable export formats, call the QMed_GetExportTypes command. QMedical defines the following constants for the export formats supported by QuickTime 4.x.

qmed_JPEGFile "JPEG" JPEG/JIFF file format
qmed_TIFFFile "TIFF" TIFF file format
qmed_PNGFile "PNGf" PNG file format
qmed_BMPFile "BMPf" BMP file format
qmed_PhotoshopFile "8BPS" Adobe Photoshop file format
qmed_PictureFile "PICT" Apple PICT file format
qmed_QTImageFile "qtif" QuickTime Image file format
qmed_TargaFile "TPIC" Truevision Targa file format
qmed_SGIImageFile ".SGI" Silicon Graphics SGI file format
qmed_MacPaintFile "PNTG" Apple MacPaint file format

Example

  `Save image in pict format
 
C_LONGINT($error)
C_TEXT($targetFIle)
C_LONGINT(gImageRef)
 
$targetFile:="Hard disk:images:people.pict"
$error:=QMed_ExportImage (gImageRef;$targetFile;qmed_PictureFile)
 
If ($error # qmed_noErr)
   `Handle the error
End if

Related commands

QMed_GetExportTypes Returns the list of available export types

QMedical © Escape
Generated by QDoc 2.8 on Wed, Jan 27, 2010 17:54:36