Bitmaps can be written to files by sending the writeBitmapFile:width:height:xHot:yHot: message to the bitmap.The bitmap file format only supports a CgPixmap of depth one. It is an error to try to write a CgPixmap with a different depth.The bitmap is written in X11 bitmap file format, which looks like C source code for a structure initialization. Parameters passed to the method include the file name, the width, the height, and the hot spot coordinates within the bitmap. A hot spot is useful for cursor specifications. The write operation returns zero if successful, or an error value if unsuccessful.
|