Article ID: 43021
This article was previously published under Q43021
This article has been archived. It is offered "as is" and will no longer be updated.
There are two routines you can use to write a picture to the resource fork of a file: SavePicture and AddPicture.
This article describes how to use SavePicture to save an image as a PICT resource that was recorded in the QuickDraw string format using the PICTURE ON and PICTURE OFF statements.
An alternate method is to record the picture as a bitmap with OpenPicture and ClosePicture, and save it as a PICT resource with the AddPicture routine. For more information, query in this Knowledge Base on the following words:
You can record a picture as a string of QuickDraw calls with the PICTURE ON and PICTURE OFF statements. This string can be translated to a picture with the PICTURE$ function and written to the resource fork of a file with SavePicture. SavePicture is an MBLC routine that is built into QuickBASIC.
Once you save the picture in the resource fork of a file, you can use ResEdit or a BASIC program to move it to the resource fork of another file or application. (However, this QuickDraw string format will not be viewable in ResEdit.) You can retrieve the picture into a string variable with the LoadPicture routine, and redraw it with QuickBASIC's PICTURE statement.
Article ID: 43021 - Last Review: February 27, 2014 - Revision: 1.2