GetPictureFileHeader
TheGetPictureFileHeaderfunction extracts the picture frame (thepicFramerectangle in the picture structure) and file header from a specified picture file (PICT file). Your program can use this information to determine how to draw an image without having to read the picture file.
pascal OSErr GetPictureFileHeader (short refNum, Rect *frame, OpenCPicParams *header);
refNum- Contains a file reference number for the source PICT file.
frame- Contains a pointer to a rectangle that is to receive the picture frame rectangle of the picture file. This function places the
picFramerectangle from the picture structure into the rectangle referred to by theframeparameter. If you are not interested in this information, passnilin
this parameter.header- Contains a pointer to an
OpenCPictureparameters structure. TheGetPictureFileHeaderfunction places the header from the specified picture file into the structure referred to by theheaderparameter. Note that this function always returns a version 2 header. If the source file is a version 1 PICT file, theGetPictureFileHeaderfunction converts the header into version 2 format before returning it to your application. See Inside Macintosh: Imaging for more information about picture headers and theOpenCPicturefunction. If you are not interested in this information, passnilin this parameter.DESCRIPTION
TheGetPictureFileHeaderfunction always returns a version 2 PICT file header. If the specified picture file is a version 1 file, theGetPictureFileHeaderfunction synthesizes a version 2 header from the information available in the file header.RESULT CODES
File Manager errors
noErr 0 No error paramErr -50 Invalid parameter specified
Main | Top of Section | What's New | Apple Computer, Inc. | Find It | Feedback | Help