ImgDoc_CreateNew_JSN

Create a reference to a new, empty image document.
ImgDoc_CreateNew_JSN(optionsJSON) ➔ imgDocRef
optionsJSON Text Options
↩︎ imgDocRef Text The image document reference.

Create a reference to a new, empty image document.

The optional optionsJSON parameter is a 4D object serialized in JSON format that may be used to specify the format of the new document:

Property name Type Default Description
Format string TIFF The format ID of the new document. Any of the raster formats supported by Q2Pix may be used.

The image document reference is returned in imgDocRef. The caller must release the document reference when no longer needed with a call to ImgObj_Release, otherwise there will be a memory leak.

Note

The ImgDoc_CreateNew method in Q2PixLib is a wrapper to this method that passes the options parameter directly as a 4D object instead of a JSON serialization.