The following example creates a new PCIDSK file called my.pix containing the data of the first channel of the file irvine.pix from the demo directory.
local integer sfid, tfid
local string temp_file
temp_file = "./my.pix"
delete temp_file noerror
sfid = DBOpen( GetPCIHOME() + "/demo/irvine.pix", "r" )
tfid = DBCreate( temp_file, "PIX", DBPixels(sfid), DBLines(sfid), \
1, DBChanType(sfid,1), "" )
MODEL
%{tfid,1} = %{sfid,1}
ENDMODEL
call DBClose( sfid )
call DBClose( tfid )
The file my.pix should be created in the current working directory.
© PCI Geomatics Enterprises, Inc.®, 2026. All rights reserved.